Function positioning - 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: Function positioning (
/showthread.php?tid=475808)
Function positioning -
moof2010 - 15.11.2013
Hi, where i need to put
Код:
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
new rand = (1+locatiitir[playerid]+random(sizeof(tirlocatii)-1))%sizeof(tirlocatii);
locatiitir[playerid] = rand;
SetPlayerCheckpoint(playerid,tirlocatii[rand][0],tirlocatii[rand][1],tirlocatii[rand][2],3);
}
return 1;
to set checkpoint when the truck pickup the attach
Re: Function positioning -
newbie scripter - 15.11.2013
OnPlayerUpdate??
Re: Function positioning -
moof2010 - 15.11.2013
how to change my instructions to execute only once in onplayerupdate?
Re: Function positioning -
Vince - 15.11.2013
This code requires a trigger. What that trigger is, is totally up to you. It could be a command, entering a checkpoint, pressing a key, ... OnPlayerUpdate isn't the right spot for this.
Re: Function positioning -
moof2010 - 15.11.2013
i resolve with trigger