Interior change problem
#6

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:
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;
        }
    }
}
Reply


Messages In This Thread
Interior change problem - by Tanush123 - 01.01.2012, 23:15
Re: Interior change problem - by Tanush123 - 02.01.2012, 06:04
Re: Interior change problem - by parames3010 - 02.01.2012, 06:10
Re: Interior change problem - by Max_Coldheart - 02.01.2012, 07:25
Re: Interior change problem - by Tanush123 - 02.01.2012, 08:39
Re: Interior change problem - by Dark_Kostas - 02.01.2012, 08:47

Forum Jump:


Users browsing this thread: 2 Guest(s)