Quote:
Originally Posted by EiresJason
The IsPlayerInDynamicCP function is looking for a checkpointid value, not the location of the checkpoint.
pawn Код:
IsPlayerInDynamicCP(playerid, checkpointid) { /* code */ }
Somewhere within your script, you must have created dynamic checkpoints using something like:
pawn Код:
new RobberyCheckpoints[14];
for(...) // for loop { RobberyCheckpoints[i] = CreateDynamicCheckpoint(RobberyCPs[i][0], RobberyCPs[i][1], RobberyCPs[i][2]...); }
You need to use this variable:
So your code should look like this:
pawn Код:
stock IsPlayerInRobberyCheckpoint(playerid) { for(new i=0; i < sizeof(RobberyCPS); i++) { if(IsPlayerInDynamicCP(playerid, RobberyCheckpoints[i])) { return 1; } } return 0; }
|
Ι changed it and did this
PHP код:
stock IsPlayerInRobberyCheckpoint(playerid)
{
if(IsPlayerInDynamicCP(playerid, sizeof(RobberyCPS)))
{
return 1;
}
return 0;
}
Is it wrong though ?