Near to a RaceCheckpoint - 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: Near to a RaceCheckpoint (
/showthread.php?tid=640380)
Near to a RaceCheckpoint -
None1337 - 01.09.2017
Hello, i work for a pizza job and when a player press Y he will get the pizza in hands, but he can press anytime Y and put the pizza in his hands, i want only when is near to his RaceCheckpoint to use Y and put the pizza in his hand.
I don't know how can i do that, i use SetPlayerRaceCheckpoint and i have a random CP, for example:
Код:
new Float:gRandomPizza[5][3] = {
{-2765.3999,375.5730,6.3359},
{-1659.5601,1368.5300,7.1722},
{-2722.7900,-166.4240,5.0000},
{-2840.1399,866.9500,44.0547},
{-2710.7200,968.0820,54.4609}
};
And when he use command /pizza will get the RaceCheckpoint something like this:
Код:
rand = random(sizeof(gRandomPizza));
SetPlayerRaceCheckpoint(playerid,0,gRandomPizza[rand][0],gRandomPizza[rand][1],gRandomPizza[rand][2],0.0,0.0,0.0,4.0);
If somone can help me, please post here
Re: Near to a RaceCheckpoint -
None1337 - 02.09.2017
bump
Re: Near to a RaceCheckpoint -
coool - 02.09.2017
You can use `IsPlayerInRaceCheckpoint`