[Ajuda] Comando /limparchat com motivo
#6

PHP код:
if(strcmp(cmd"/lchat"true) == || strcmp(cmd"/limparchat"true) == 0

    if(
IsPlayerConnected(playerid)) 
    { 
        if(
PlayerInfo[playerid][pAdmin] < 3
        { 
            
SendClientMessage(playeridCOLOR_GREY"Vocк nгo й um admin!"); 
            return 
true
        } 
        
tmp strrest(cmdtextidx); 
        if(!
strlen(tmp)) 
        { 
            
SendClientMessage(playeridCOLOR_GRAD2"USE: /limparchat [motivo]"); 
            return 
true
        } 
          if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != DONO
        { 
            
SendClientMessage(playeridCOLOR_GRAD1" Vocк nгo estб em modo Admin USE: /jogar"); 
            return 
true
        } 
        for(new 
i=0i<MAX_PLAYERSi++) 
        { 
            if(
IsPlayerConnected(i)) ClearChatbox(i100); 
        } 
        
format(stringsizeof(string), "O admin %s limpou o chat, motivo: %s"PlayerName(playerid), tmp); 
        
SendClientMessageToAll(COLOR_WHITEstring); 
    } 
    return 
true

Sу coloque esta stock abaixo se vocк nгo tiver ela em seu gamemode ou include!
Primeiro vocк compila, se der erro do tipo: error 017: undefined symbol "strrest", ai vocк adiciona ela no final de seu gamemode!
PHP код:
stock strrest(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
    new 
offset index;
    new 
result[128];
    while ((
index length) && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;

Reply


Messages In This Thread
[Ajuda] Comando /limparchat com motivo - by WiliHacking - 03.09.2016, 04:36
Re: [Ajuda] Comando /limparchat com motivo - by Andinho - 03.09.2016, 04:56
Re: [Ajuda] Comando /limparchat com motivo - by RiqueP - 03.09.2016, 04:58
Re: [Ajuda] Comando /limparchat com motivo - by Andinho - 03.09.2016, 05:08
Re: [Ajuda] Comando /limparchat com motivo - by WiliHacking - 03.09.2016, 06:58
Respuesta: [Ajuda] Comando /limparchat com motivo - by SammyJ - 03.09.2016, 09:32
Re: [Ajuda] Comando /limparchat com motivo - by WiliHacking - 03.09.2016, 12:37
Re: [Ajuda] Comando /limparchat com motivo - by RiqueP - 03.09.2016, 13:01
Re: [Ajuda] Comando /limparchat com motivo - by WiliHacking - 03.09.2016, 13:58

Forum Jump:


Users browsing this thread: 1 Guest(s)