[Ajuda] Duvida em comando
#2

Presta atenзгo nas chaves...
pawn Код:
CMD:aduty(playerid, params[])
{
    new string[128], victimname[MAX_PLAYER_NAME], id;
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1,SEM_NIVEL);

    if(PlayerInfo[playerid][pAdminDuty] == 0)
    {
        GetPlayerName(id, victimname, sizeof(victimname));

        if(PlayerInfo[playerid][pAdmin] >= 5)
        {
            format(string, sizeof(string), "O Fundador %s (ID:%d) estб agora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_GREEN,string);
            SetPlayerColor(playerid,COLOR_GREEN);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 4)
        {
            format(string, sizeof(string), "O Head-Admin (ID:%d) estб agora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_LIGHTBLUE,string);
            SetPlayerColor(playerid,COLOR_LIGHTBLUE);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 3)
        {
            format(string, sizeof(string), "O Administrador (ID:%d) estб agora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_NICERED,string);
            SetPlayerColor(playerid,COLOR_NICERED);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 2)
        {
            format(string, sizeof(string), "O Game-Master (ID:%d) estб agora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_YELLOW,string);
            SetPlayerColor(playerid,COLOR_YELLOW);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            format(string, sizeof(string), "O Trial Game-Master (ID:%d) estб agora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_ORANGE,string);
            SetPlayerColor(playerid,COLOR_ORANGE);
        }
        PlayerInfo[playerid][pAdminDuty] = 1;
    }
    else
    {
        if(PlayerInfo[playerid][pAdmin] >= 5)
        {
            format(string, sizeof(string), "O Fundador (ID:%d) estб agora fora de serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_GREEN,string);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 4)
        {
            format(string, sizeof(string), "O Head-Admin (ID:%d) estб agora fora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_LIGHTBLUE,string);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 3)
        {
            format(string, sizeof(string), "O Administrador (ID:%d) estб agora fora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_NICERED,string);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 2)
        {
            format(string, sizeof(string), "O Game-Master (ID:%d) estб agora fora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_YELLOW,string);
        }
        else if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            format(string, sizeof(string), "O Trial Game-Master (ID:%d) estб agora fora em serviзo.",victimname, playerid);
            SendClientMessageToAll(COLOR_ORANGE,string);
        }
        PlayerInfo[playerid][pAdminDuty] = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Duvida em comando - by DaYviSoN - 19.07.2014, 23:39
Re: Duvida em comando - by ForT - 19.07.2014, 23:47
Re: Duvida em comando - by DaYviSoN - 20.07.2014, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)