02.01.2012, 08:47
As you use CP, you can use the OnPlayerEnterCheckpoint callback instead of a timer. Also you can have something like a cooldown after entering/exiting from somewhere. So you can have a var like this one. Each time you enter/exit somewhere change it to 5 and then each second reduce it by 1. Only if its equal to 0 let him enter.
Example:
Example:
pawn Код:
OnOneSecondTimer(playerid)
{
if (EnterExitCoolDown[playerid] > 0) EnterExitCoolDown[playerid] --;
if (EnterExitCoolDown[playerid] == 0)
{
//your position check
if PLAYER_AT_ENTER_POINT
{
Teleport_Him
EnterExitCoolDown[playerid] = 5;
}
}
}