state change - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: state change (
/showthread.php?tid=609364)
state change -
alexanderjb918 - 11.06.2016
I wanna add the 0.3.7 sirens to a vehicle onplayerstate changes is that possible instead of making static vehicles?
Re: state change -
Sjn - 11.06.2016
Yes, with a small trick it is.
When a player's state has been changed, just fetch the player's vehicleid, model and X, Y, Z, A positions then destroy the vehicle and create the same model in the fetched position with siren enabled immediately. Put the player inside that newly created vehicle again. Except this, there is no other ways I believe. Since the parameter to enable this feature is inside the function that creates a vehicle.
But, I don't see a point for this, since the siren can be toggled on/off by pressing the horn key once it has been enabled (while creating the vehicle).