02.08.2014, 05:18
you need to use a variable for each player
like
then onplayerconnect
after this
like
pawn Код:
new Bo[MAX_PLAYERS];
pawn Код:
Bo[playerid] = 0;
pawn Код:
if (strcmp(cmdtext, "/whereismech", true) == 0)
{
if (Bo[playerid] == 1) return SendClientMessage(playerid, 0xFF0000AA, "You already have an active Checkpoint, please use /deletecheckpoint to have another one");
else if (!IsPlayerInRangeOfPoint(playerid, 5, 1607.2327, -1841.8683, 13.5116))
{
SetPlayerCheckpoint(playerid, 1607.2327, -1841.8683, 13.5116, 3);
SendClientMessage (playerid, 0xFF0000AA, "Go to the checkpoint and /repair there");
Bo[playerid]=1;
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are already in the mechanic place, use /repair, this will cost you 5000$");
return 1;
}
}
public OnPlayerEnterCheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid);
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
Bo[playerid]=0;
return 1;
}