01.09.2017, 21:08
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:
And when he use command /pizza will get the RaceCheckpoint something like this:
If somone can help me, please post here
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} };
Код:
rand = random(sizeof(gRandomPizza)); SetPlayerRaceCheckpoint(playerid,0,gRandomPizza[rand][0],gRandomPizza[rand][1],gRandomPizza[rand][2],0.0,0.0,0.0,4.0);