|
 |
|
|
|
|
|
GTA Modification Forums
SCM Hook for San Andreas get it here
 |
|
 |
| |
Un3462  |
Posted: Wednesday, Nov 30 2005, 18:53
|
Mack Pimp

Group: Members
Joined: Jun 27, 2002


|
i don't know much c(++), but try changing the following in scripting.cpp: | CODE | Script& Script::operator<<(const char* str) { BYTE b[9]; if (!str) return *this; memset(b, 0, 9); b[0] = 9; strncpy((char*) b + 1, str, 8); add(b, 9); return *this; } |
to | CODE | Script& Script::operator<<(const char* str) { BYTE b[34]; if (!str) return *this; b[0] = 14; b[1] = strlen(str); strncpy((char*) b + 2, str, b[1]); add(b, b[1] + 2); return *this; } |
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
ceedj  |
Posted: Wednesday, Nov 30 2005, 19:15
|
PEDS Creator

Group: Members
Joined: May 21, 2005



|
Wow. Just like, WOW. THANK YOU CYQ!!! I had suspected that this was the section that needed to be altered. Just out of curiousity, how did you arrive at those values? In case I need to bump it up again? (I gather the "b[0] = 14;" is where it is set) Also note that if you want to use animations in files OTHER than "PED" you will have to load it first using the load_animation opcode. You should probably release_animation after you're done as well. Many HUGE thanks again!  EDIT: Ok the longest string I was able to find thus far is "BMX_TALKRIGHT_LOOP", and I didn't need to change any values for it to work, so unless I find one bigger that causes a problem, I don't think anything needs to be changed. Awesome. This post has been edited by ceedj on Wednesday, Nov 30 2005, 19:35
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Un3462  |
Posted: Wednesday, Nov 30 2005, 19:41
|
Mack Pimp

Group: Members
Joined: Jun 27, 2002


|
14 is the parameter type for a variable length string. the byte after that is the string length, and the rest is the string (not null-terminated). the hook might not handle variable length string variables correctly either, but i don't think you really need those.
to bump it up again you only need to increase the buffer size, which is now 34 (partype byte + length byte + 32 byte string, which is more than enough, and i don't even know if such long strings are supported by sa's interpreter). or, depending on how "add" is implemented, you could try simply sending it the two special bytes first, and then another "add" call for the string directly from the function argument.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Cerbera  |
|
Ben "Cerbera" Millard

Group: Members
Joined: Jun 22, 2002



|
Removing the height and speed limits for planes is awesome, I can't believe I havn't found this mod before! By the way, OP, you really need a better host. There was a queue of half an hour for me to download this, which I only realised after looking through every piece of randomly positioned text on the automated download page. I used AlienX's mirror in the end. Is there a way to specify which install of GTASA the loader starts up in? I've got two installs and it always loads up my backup one, without letting me choose whether that's the one I want or not. It's a pain having to run my modded install, tab out of it, start the loader, than tab back in every time I want to test a change to an airplane setup. It's a great mod, I really like being able to fly at high speeds and altitudes, it's just a bit inconveniant having to switch between GTASA and the desktop.  (EDIT) Using the limit removal for planes, I've come up with a Hydra setup which accelerates a bit more realistically and have released it in my GTASA Handling Overhaul topic. Top speed when flying level is about 600mph. However, thanks to the height limit remover, you can do massive dives to get over 800km/h!  (EDIT2) I've worked around the GTASA install selection. I created a shortcut to the EXE on my desktop, opened its Properties and then set the Shortcut key. I can now just press Ctrl+Alt+L when at the main menu in GTASA to start the loader. I can then use the loader's built in shortcuts for turning off the speed limit ( Alt+F9) and altitude limits ( Alt+F8) in-game. This post has been edited by Cerbera on Monday, Mar 6 2006, 14:26
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
SilverGlow  |
Posted: Saturday, Mar 11 2006, 13:25
|
It's peanutbutterjelly time!

Group: Members
Joined: May 10, 2005


|
ok maybe i'm just a noob and u guys already know it but when i went to the liberty city area there is a hidden interior at marco bistro's, it even has classical music playing in the background.. looks really cool
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
ceedj  |
Posted: Thursday, Apr 20 2006, 05:21
|
PEDS Creator

Group: Members
Joined: May 21, 2005



|
Found a bug! But I fixed it. In Scripting.cpp, change: | CODE | void Or(Script& s) { Block* b = s.peek(1); if (!b) { s.dwErrors |= ERROR_NESTING; return; } if (!b->addr) { s.dwErrors |= ERROR_CONDITIONAL; return; } BYTE& c = s.bScriptBuffer[b->addr]; if (!c) { c = 20U; return; } if (c < 20U || c >= 28) { s.dwErrors |= ERROR_CONDITIONAL; return; } c++; }
|
to this | CODE | void Or(Script& s) { Block* b = s.peek(1); if (!b) { s.dwErrors |= ERROR_NESTING; return; } if (!b->addr) { s.dwErrors |= ERROR_CONDITIONAL; return; } BYTE& c = s.bScriptBuffer[b->addr]; if (!c) { c = 21U; return; } if (c < 21U || c >= 28) { s.dwErrors |= ERROR_CONDITIONAL; return; } c++; }
|
(you're changing the c = 20U; to c = 21U; and (c < 20U) to (c < 21U) .) If you don't do this, your "Or" commands won't work. Frustrated me for about two hours.  Hope this helps some peeps. EDIT: According to the ReadMe, it says you can have up to nine conditionals, but according to this post, you can only have up to 8. Unless this changed for San Andreas. Can anyone confirm this (besides my own testing  )? This post has been edited by ceedj on Thursday, Apr 20 2006, 07:18
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(5) 1 [2] 3 4 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|