24.12.2012, 15:51
Hey guys i have a problem with my command for my pizza boy job FS.
The problem is that when i type: /deliverpizza in-game nothing happens.(I don't have any pawno errors or warnings)
Here are the random checkpoints:
This is the command i have problem with, it's the actual command to start delivering pizzas:
The problem is that when i type: /deliverpizza in-game nothing happens.(I don't have any pawno errors or warnings)
Here are the random checkpoints:
pawn Код:
new Float:RandomCheckpoint[][4] =
{
{2362.9297,-1643.3599,14.3082, 10.0},
{2523.2732,-1679.4453,15.4970, 10.0},
{2178.5088,-1660.3746,14.9678, 10.0}
};
pawn Код:
CMD:deliverpizza(playerid, params[])
{
if(PizzaBoy[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, 2124.5547,-1803.9019,13.5547))
{
new rand = random(sizeof(RandomCheckpoint));
SetPlayerCheckpoint(playerid, RandomCheckpoint[rand][0], RandomCheckpoint[rand][1], RandomCheckpoint[rand][2],3);
} else {
if (GetPVarType(playerid, "Delivering"))
SendClientMessage(playerid, COLOR_LIGHTRED, "You are already delivering pizzas !");
}
return 1;
}