2 Easy questions.
#6

Over main()
pawn Код:
new SafeZoneTimer;
new hasBeenInSafeZone[MAX_PLAYERS];
forward SafeZone();
OnGameModeInit()
pawn Код:
SafeZoneTimer = SetTimer("SafeZone", 200, true);
OnGameModeExit()
pawn Код:
KillTimer(SafeZoneTimer);
Anywhere in script
pawn Код:
public SafeZone()
{
    for(new i=0, m=MAX_PLAYERS; i<m; i++)
    {
        if(IsPlayerInArea(i, 1319.6, -2755.979, 2207.118, -2125.373) && !hasBeenInSafeZone[i])
        {
            GameTextForPlayer(i, "~g~Safe Zone", 2000, 5);
            //Add timer for god here
            hasBeenInSafeZone[i] = 1;
        }
        else if(hasBeenInSafeZone[i])
        {
            GameTextForPlayer(i, "~r~Left Safe Zone", 2000, 5);
            //Kill godtimer
            hasBeenInSafeZone[i] = 0;
        }
    }
    return true;
}
Not tested, but should work
Reply


Messages In This Thread
2 Easy questions. - by Mrkrabz - 23.12.2008, 13:27
Re: Gang zone. - by LarzI - 23.12.2008, 13:30
Re: 2 Easy questions. - by Mrkrabz - 23.12.2008, 13:31
Re: 2 Easy questions. - by LarzI - 23.12.2008, 13:32
Re: 2 Easy questions. - by Mrkrabz - 23.12.2008, 13:35
Re: 2 Easy questions. - by LarzI - 23.12.2008, 13:42
Re: 2 Easy questions. - by Mrkrabz - 23.12.2008, 13:46
Re: 2 Easy questions. - by LarzI - 23.12.2008, 13:48
Re: 2 Easy questions. - by Mrkrabz - 23.12.2008, 13:51
Re: 2 Easy questions. - by LarzI - 23.12.2008, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)