27.07.2012, 22:43
You are doing it wrong obviously. You need to use a variable to detect what the checkpoint is. Then you do something like:
Now your 'SetPlayerCheckpoint' code doesn't need any chaning. But you need t add your new variable underneath it and set it to '1'. Like the example below shows.
That is one method of doing it. And going to be the easiest to add for your script.
pawn Код:
new NeonCheckpoint[MAX_PLAYERS];
public OnPlayerEnterCheckpoint(playerid)
{
if(NeonCheckpoint[playerid] == 1)
{
GameTextForPlayer(playerid, "Do NOT abuse the neons!", 5000, 1);
DisablePlayerCheckpoint(playerid);
}
return 1;
}
pawn Код:
SetPlayerCheckpoint(playerid, 1.0, x, y, z);
NeonCheckpoint[playerid] = 1;
That is one method of doing it. And going to be the easiest to add for your script.