07.02.2017, 08:50
Hello iam making a challenge system i use this from samp wiki
So how to show the checkpoint only for the player who is in the challenge? also if he go to take it how to check that this Checkpoint is for the challenge {Test}?
PHP код:
// In this example the player's checkpoint will be set when they spawn.
// On entering the checkpoint they will receive $1000 and the checkpoint will be disabled.
new bool:onCheck[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
onCheck[playerid] = true;
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid]) // if it's true
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
onCheck[playerid] = false;
}
return 1;
}