Near to a RaceCheckpoint
#1

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
Reply
#2

bump
Reply
#3

You can use `IsPlayerInRaceCheckpoint`
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)