Skip to content

Instantly share code, notes, and snippets.

@JuniorDjjr
Created June 27, 2022 07:30
Show Gist options
  • Save JuniorDjjr/53b70bba5213cb7e988a18a11313f7d2 to your computer and use it in GitHub Desktop.
Save JuniorDjjr/53b70bba5213cb7e988a18a11313f7d2 to your computer and use it in GitHub Desktop.
SCRIPT_START
{
LVAR_INT scplayer
LVAR_FLOAT x y z
GET_PLAYER_CHAR 0 (scplayer)
WHILE TRUE
WAIT 0
GET_PLAYER_CHAR 0 scplayer
GOSUB ProcessPlayer
IF IS_2PLAYER_GAME_GOING_ON
GET_PLAYER_CHAR 1 scplayer
GOSUB ProcessPlayer
ENDIF
ENDWHILE
ProcessPlayer:
IF IS_CURRENT_CHAR_WEAPON scplayer WEAPONTYPE_MOLOTOV
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS scplayer 0.5 0.5 0.1 (x y z)
DRAW_SHADOW 3 x y z 0.0 6.0 1 50 25 0
DRAW_LIGHT_WITH_RANGE x y z 255 150 0 5.0
ENDIF
RETURN
}
SCRIPT_END
@KittyGill
Copy link

Mr.Djjr, i want to use this source code, i have a mod idea. I am also a modder at libertycity.net. A new modder to be specific. If I need specific permission protocol please let me know( If such thing exists).

@JuniorDjjr
Copy link
Author

Mr.Djjr, i want to use this source code, i have a mod idea. I am also a modder at libertycity.net. A new modder to be specific. If I need specific permission protocol please let me know( If such thing exists).

Yes just keep clear credits for me.

@KittyGill
Copy link

hello i was working on a torch mod, i thought to use searchlight for torch beam, but i am unable to edit the radius and length of the searchlight.
please help me, if you have time or share any documentation. I use GTA3Script to make mods.

@JuniorDjjr
Copy link
Author

Doesn't make much sense to use the searchlight (that is, the spotlight) for a torch, as the torch illuminates in all directions.

@KittyGill
Copy link

Doesn't make much sense to use the searchlight (that is, the spotlight) for a torch, as the torch illuminates in all directions.

then how would i be able to make the torch work? I saw code of a modder,it adds flashlight to guns, they also used searchlight. The problem i am facing is that i cannt figure out how to control the radius and length of it.

@JuniorDjjr
Copy link
Author

I don't understand your point, you are asking how to make a mod, exactly in the mod code.

@KittyGill
Copy link

I don't understand your point, you are asking how to make a mod, exactly in the mod code.

I just want to know how to manipulate the searchlight in gta3script. Btw thanks for replying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment