Loop Problem
#4

Put:

pawn Код:
//In The OnGameModeInit


SetTimer("WantedLevel", 500, 1);



//In The OnPlayerCommandText:



if(strcmp("/test", cmdtext, true, 4) == 0)
    {
        SetPlayerWantedLevel(playerid, 5);
        return 1;
    }




//In the end of the gamemode:

forward WantedLevel();
public WantedLevel()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerSpawned[i] == 1)
        {
            new wantedlevel = GetPlayerWantedLevel(i);
            if(wantedlevel == 0){SetPlayerToTeamColour(i);}
            if(wantedlevel >= 1){SetPlayerColor(i, COLOR_WANTED);}
        }
    }
}

I hope that i have helped
Reply


Messages In This Thread
Loop Problem - by Infamous - 09.12.2010, 16:11
Re: Loop Problem - by Ash. - 09.12.2010, 16:55
Re: Loop Problem - by Infamous - 09.12.2010, 17:05
Re: Loop Problem - by rjjj - 09.12.2010, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)