SA-MP Forums Archive
Need help in Race Script - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help in Race Script (/showthread.php?tid=77750)



Need help in Race Script - cloud9 - 14.05.2009

Hi Guys

I am using adrenalineX 1.6. I need to add a command to it which will tele them back to the last checkpoint they passed.

Command:
/checkpoint

which should tele them back to the last checkpoint they crossed. Hope some one can help me.


This commands would help them if they f***** up during the races


Re: Need help in Race Script - Gamer007 - 14.05.2009

it won't help them because they can write /checkpoint everytime and teleport to checkpoint they even didn't pass..


Re: Need help in Race Script - cloud9 - 14.05.2009

nah wat i am saying is if they have crossed 7th check point and fucked up before passing 8th one then when they type /checkpoint it must tele them to the 7th checkpoint. Last Checkpoint means the previous checkpoint they have passed.


Re: Need help in Race Script - Gamer007 - 14.05.2009

that's impossible.


Re: Need help in Race Script - Think - 14.05.2009

Quote:
Originally Posted by Gamer007
that's impossible.
no its not learn how to script.

first at onplayercheckpoint, get the players pos and store them in variables for the specific player (old(x / y / z)[playerid] new old(x / y / z[MAX_PLAYERS]) than make a command /checkpoint ( what you wanted ) and do this: SetPlayerPos(playerid, oldx[playerid],oldy[playerid],oldz[playerid]);
you can do this with rotation too but thats up to you.


Re: Need help in Race Script - cloud9 - 15.05.2009

Thanks very much. I had this idea but i am poor in scripting so can any one of make this command for me. or tell me how to store the variables.