12.06.2013, 19:45
Hello!
So, I tried to make a checkpoint...Everything is working fine, but checkpoint doesn't want to show again after 5 seconds : (
Code:
Thanks for help
So, I tried to make a checkpoint...Everything is working fine, but checkpoint doesn't want to show again after 5 seconds : (
Code:
pawn Код:
new money[MAX_PLAYERS];
forward GiveMoney(playerid);
public GiveMoney(playerid)
{
GivePlayerMoney(playerid, 2500);
SendClientMessage(playerid, -1, "You have earned 2500 cash!");
DisablePlayerCheckpoint(playerid);
return 1;
}
forward EnableMoney(playerid);
public EnableMoney(playerid)
{
money[playerid] = SetPlayerCheckpoint(playerid, 1958.3783, 1343.1572, 15.3746, 2.0);
return 1;
}
public OnPlayerSpawn(playerid)
{
money[playerid] = SetPlayerCheckpoint(playerid, 1958.3783, 1343.1572, 15.3746, 2.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(money[playerid])
{
SendClientMessage(playerid, -1, "Stay in Checkpoint for 10 seconds!");
SetTimerEx("GiveMoney", 10000, false, "i", playerid);
}
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
SetTimerEx("EnableMoney", 5000, false, "i", playerid);
return 1;
}
![Smiley](images/smilies/smile.png)