[Pedido] Chat lнder em strcmp.
#6

Eu tava editando um GameMode e adaptei esse , acho que pode te ajudar .

PHP код:
if(strcmp(cmd"/lchat"true) == || strcmp(cmd"/liderchat"true) == 0)
    {
        if(
PlayerInfo[playerid][pMuted] == 1)
        {
            
SendClientMessage(playeridCOLOR_YELLOW"Vocк nгo pode falar, pois foi calado");
            return 
true;
        }
        if(
IsPlayerConnected(playerid))
        {
            
GetPlayerName(playeridsendernamesizeof(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(playeridCOLOR_YELLOW"USE: /lchat [ Digite ]");
                return 
true;
            }
            if(
TentouDivulgar(result))
            {
                  if(
cdivulgar[playerid] >= 4)
                  {
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Seu servidor й uma merda, nгo divulgue-o aqui!");
                    
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
                    
PlayerPlaySound(playerid11330.00.00.0);
                    
Kick(playerid);
                  }
                  
GetPlayerName(playeridplayernameMAX_PLAYER_NAME);
                  
format(string128"AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
                
ABroadCast(COLOR_YELLOW,string,1);
                
DivulgouLog(string);
                
cdivulgar[playerid] += 1;
                return 
true;
            }
            if (
PlayerInfo[playerid][pCargo] == 5)
            {
                
format(stringsizeof(string), "*Sub-Lнder %s: %s"PlayerName(playerid), result);
                
ABroadCast(COLOR_YELLOWstring1);
            }
            else if (
PlayerInfo[playerid][pCargo] == 6)
            {
                
format(stringsizeof(string), "*Lнder %s: %s"PlayerName(playerid), result);
                
ABroadCast(COLOR_YELLOWstring1);
            }
            
format(stringsizeof(string), "[%d/%d/%d] [%d:%d:%d] *%d : %s: %s"v[2], v[1], v[0], v[3], v[4], v[5] , PlayerInfo[playerid][pCargo], sendernameresult);
            
liderchatLog(string);
        }
        return 
true;
    } 
Reply


Messages In This Thread
Chat lнder em strcmp. - by DannielCooper - 13.06.2013, 02:33
Re: Chat lнder em strcmp. - by BielCOP - 13.06.2013, 02:33
Re: Chat lнder em strcmp. - by DannielCooper - 13.06.2013, 02:39
Re: Chat lнder em strcmp. - by MonFiTy - 13.06.2013, 02:46
Re: Chat lнder em strcmp. - by DannielCooper - 13.06.2013, 02:50
Respuesta: Chat lнder em strcmp. - by Wendell - 13.06.2013, 03:09
Re: Chat lнder em strcmp. - by DannielCooper - 13.06.2013, 03:15
Respuesta: Re: Chat lнder em strcmp. - by Wendell - 13.06.2013, 03:34

Forum Jump:


Users browsing this thread: 4 Guest(s)