[Ajuda] Chat Com Adm
#1

Resolvido
Tinha esquecido do zcmd
Reply
#2

Tire o loop ...
Reply
#3

pawn Код:
error 017: undefined symbol "i"
Tem que criar um new lб no topo do GM?
Reply
#4

Tente:

pawn Код:
if(strcmp(cmd, "/chatadm", true) == 0 || strcmp(cmd, "/ca", true) == 0)
{
    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pSocio] >= 4)
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));

        new length = strlen(cmdtext);

        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
            idx++;
        }

        new offset = idx;

        new result[64];

        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
            result[idx - offset] = cmdtext[idx];
            idx++;
        }
        result[idx - offset] = EOS;

        if(!strlen(result))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Use: /chatadmin [mensagem]");
            return 1;
        }

        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][pAdmin] >= 2)
            {
                format(string, sizeof(string), "Admin %s: %s", sendername, result);
                SendGayMessage(0x9955DEEE, string);
                printf("Admin %s: %s", sendername, result);
            }

            if(PlayerInfo[i][pSocio] >= 4)
            {
                format(string, sizeof(string), "Sуcio %s: %s", sendername, result);
                SendGayMessage(0x9955DEEE, string);
                printf("Sуcio %s: %s", sendername, result);
            }
        }
    }
    return 1;
}



stock SendGayMessage(cor, string[]) //Adicione ao final de seu GameMode
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 2 && PlayerInfo[i][pSocio] >= 4)
        {
            SendClientMessage(i, cor, string);
        }
    }
    return 1;
}
Reply
#5

Pegou nгo mano /\

Sу eu Consigo ver, e admin nгo consegue escrever nem ver o chat, sу quando eu dou sуcio pra mim, aparece o Chat mais sу pra Sуcio level 4
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)