[Ajuda] Erro Limpar Chat
#1

Resolvido !
Reply
#2

ve se funciona

pawn Код:
CMD:limparchat(playerid)
{
             new

                   sendername[MAX_PLAYER_NAME],
                   string[40]

             ;
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 1)) return SendClientMessage(playerid, COR_CINZA, "Vocк nгo й um admin!");
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i)) ClearChatbox(i, 100);
        }
        GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
        {
            format(string, sizeof(string), "~b~%s ~n~~w~Resetou o Chat!",playername);
        }
        GameTextForAll(string, 5000, 1);
        return true;
    }
    return true;
}
Reply
#3

pawn Код:
CMD:lchat(playerid)
{
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COR_CINZA, "Vocк nгo й um admin!");

    new
        string[128];
        GetNome[MAX_PLAYER_NAME];
    ;

    GetPlayerName(playerid, GetNome, sizeof(GetNome));

    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            ClearChatbox(i, 100);
        }
    }
    format(string, sizeof(string), "~b~%s ~n~~w~Resetou o Chat!",GetNome);
    GameTextForAll(string, 5000, 1);
    return 1;
}

cara da atй desgosto arruamr esses codes seus, muito ruim, desopmitizado, feio pakas, tenta ai
Reply
#4

Murilo
ta certo isso?

PHP код:
 new
        
string[128];
        
GetNome[MAX_PLAYER_NAME];
    ; 
ou й assim:
me corriga
PHP код:
 new
        
string[128],
        
GetNome[MAX_PLAYER_NAME]
    ; 
Reply
#5

Resolvido !
Reply
#6

pawn Код:
CMD:lchat(playerid)
{
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COR_CINZA, "Vocк nгo й um admin!");

    new
        string[ 129 ],
        _sk[MAX_PLAYER_NAME]
    ;

    GetPlayerName(playerid, _sk, 24);

    ClearChatboxToAll(15); // 15 numero de linhas ^^ deixe 20 no max ^^

    format(string, sizeof(string), "~b~%s ~n~~w~Resetou o Chat!",_sk);
    GameTextForAll(string, 5000, 1);
    return 1;
}

// lol acabei dando um upgrade na funзгo original kkkkk
forward ClearChatboxToAll(lines); public ClearChatboxToAll(lines)
{
    for(new i = 0; i < lines; i++)
    {
        SendClientMessageToAll(-1, " ");
    }
    return 1;
}
Reply
#7

Resolvido !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)