SA-MP Forums Archive
[Ajuda] Erro Limpar Chat - 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] Erro Limpar Chat (/showthread.php?tid=419419)



Erro Limpar Chat - Coringa_Vilao - 28.02.2013

Resolvido !


Re: Erro Limpar Chat - smiiir - 28.02.2013

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;
}



Re: Erro Limpar Chat - Maklister - 28.02.2013

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


Re: Erro Limpar Chat - smiiir - 28.02.2013

Murilo
ta certo isso?

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



Re: Erro Limpar Chat - Coringa_Vilao - 28.02.2013

Resolvido !


Re: Erro Limpar Chat - Sky™ - 28.02.2013

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;
}



Re: Erro Limpar Chat - Coringa_Vilao - 01.03.2013

Resolvido !