Scripting command questions

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Scripting command questions

Post by elypter »

you have to wrap the whole statement in another pair of brackets
yur sa'nok ngeyä
Devastator
Hitman
Hitman
Posts: 120
Joined: 06 Dec 2011, 16:54

Re: Scripting command questions

Post by Devastator »

Finally, it works! Thank you!

What is the maximum amount of lines code one can have in a script again?

It seems like the standard code for no reload times doesn't work on vehicle weapons.

EDIT: Found it, you have to use the "IS_CHAR_IN_MODEL" command for it to work.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Scripting command questions

Post by elypter »

(LIMITATION) Maximum of code lines in a script is 3014
yur sa'nok ngeyä
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: Scripting command questions

Post by T.M. »

elypter wrote:(LIMITATION) Maximum of code lines in a script is 3014
But that was only the official compiler limitation? IIRC there is another limitation about script commands which is higher than the lines limitation.
User avatar
valps
Psycho
Psycho
Posts: 65
Joined: 31 Dec 2020, 15:03
GH nick: Valps
Location: Brazil
Contact:

Re: Scripting command questions

Post by valps »

Devastator wrote: 01 Jun 2017, 15:39 ...but is there anyway to turn off player display names?
I've found the address 0x5EAD76 in 9.6f or 11.44 which stores the boolean value (1 byte) for displaying names. Here is an example of toggling on/off displaying player names dynamically:

Code: Select all


COUNTER show_player_name_add = 6204790
COUNTER player_name_toggle = 0

// some coding stuff...

toggle_name_display:

   IF (player_name_toggle = 0)
       SET in = 1
       SET player_name_toggle = 1
       CHANGE_GANG_CHAR_RESPECT (show_player_name_add, in ,111)
       RETURN
    ENDIF
    
    IF (player_name_toggle = 1)
       SET in = 0
       SET player_name_toggle = 0
       CHANGE_GANG_CHAR_RESPECT (show_player_name_add, in ,111)
       RETURN
    ENDIF
    
RETURN
Post Reply