SA-MP Forums Archive
[Ajuda] Ajuda??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda??? (/showthread.php?tid=358552)



Ajuda??? - FireBallPlays - 10.07.2012

Ola pessoal recebi reclamaзoes que quando players dava /admins para ver os administradores online,viam So off ,mesmo tendo admins online.
O sistema de admins do gamemode e de leveis 1 a 5

pawn Код:
if(strcmp(cmdtext, "/admins", true) == 0){
    new Jogador[24];
    new count = 0;
    new msg[120];
    new ListaAdmins[128];
    for(new i=0; i<MAX_PLAYERS; i++){
    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    GetPlayerName(i,Jogador,24);
    format(msg,sizeof(msg),"Admins Online's: %s", Jogador);
    SendClientMessage(playerid, 0x000FFFAA, msg);
    count++;
    }
    }
    if(count >= 0){
    SendClientMessage(playerid, Vermelho, "Admins Off");
dini_IntSet (ListaAdmins, "Admins", 1);
SendClientMessage(playerid, Verde, ListaAdmins);
}
return 1;
}
aLGUEM PODE ME AJUDAR?


Re: Ajuda??? - zbt - 10.07.2012

if(count == 0)


Re: Ajuda??? - [JD]BlackFire - 10.07.2012

qual a variбvel dos admin?


AW: Ajuda??? - denis15711 - 10.07.2012

Olha ae
pawn Код:
if(!strcmp(cmdtext, "/admins", true))
    {
        SendClientMessage(playerid, COR_PRINCIPAL, "** Todos os Admins online:");
        new admtext[64];
        new funcao[128];
        new count=0;
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][pAdmin] == 5) { admtext = "Game Master"; }
            if(PlayerInfo[i][pAdmin] == 4) { admtext = "Sub Game Master"; }
            if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level 3"; }
            if(PlayerInfo[i][pAdmin] == 2) { admtext = "Level 2"; }
            if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level 1"; }
            if(IsPlayerConnected(i))
            {
                if(logado[i] == 1)
                {
                    if(PlayerInfo[i][pAdmin] >= 1)
                    {
                        new str[256];
                        new pname[24];
                        GetPlayerName(i, pname, 24);
                        format(str, 256, "Adminstrador: %s [%s]", pname, admtext);
                        SendClientMessage(playerid, 0xE3E3E3FF, str);
                        count++;
                    }
                }
            }
        }
        if(count == 0)
        {
            SendClientMessage(playerid, 0xD8D8D8FF, "Nгo tem nenhum Admins on-line agora!");
        }
        return 1;
    }



Re: Ajuda??? - FireBallPlays - 10.07.2012

Quote:
Originally Posted by zbt
Посмотреть сообщение
if(count == 0)
Obrigado