[Ajuda] ALTERANDO O COMANDO
#1

Olб galera, estou com um GM, olha eu editei o comando tipo, o /abordar, pra quando eu abordar o player ele ficar Handsup, mais estou querendo alterar , quero colocar assim, pra quando eu abordar o player ele receber uma mensagem a do tipo /CNN, aquela que a parece na tela dele exemplo: PARADO AI, POLICIA !, olha meu comando abaixo:
quem poder alterar eu AGRADEЗO

PHP код:
if(strcmp(cmd"/abordar"true) == || strcmp(cmd"/abordar"true) == 0)
    {
        
tmp strtok(cmdtextidx);
        
giveplayerid strval(tmp);
        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
PlayerInfo[playerid][pBOPE] = dini_Int(udb_encode(sendername), "levelbope");
        
PlayerInfo[giveplayerid][pBOPE] = dini_Int(udb_encode(giveplayer), "levelbope");
        
giveplayerid strval(tmp);
        if(!
strlen(tmp) && PlayerInfo[playerid][pBOPE] >= 1)
        {
            
SendClientMessage(playeridVerde"USO: /abordar [id do player]");
            return 
1;
        }
        if(
Logado[playerid] == 1)
        {
            if(
PlayerInfo[playerid][pBOPE] >= || PlayerInfo[playerid][pPM] >= 1)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                  for(new 
i=0<= MAX_PLAYERSi++)
                  if(
GetDistanceBetweenPlayers(playeridi) <= 20)
                     {
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
                    
freeze[giveplayerid] = 1;
                    
format(stringsizeof(string), "O oficial %s abordou o jogador %s!"sendername,giveplayer);
                    
SendClientMessageToAll(Amarelostring);
                    
format(stringsizeof(string), "O oficial %s abordou vocк!"sendername);
                    
SendClientMessage(giveplayeridAmarelostring);
                    new 
PlayerName[30];
                    
GetPlayerName(playeridPlayerName30);
                    
printf("[Command] %s usou /abordar em %s."PlayerNamegiveplayer);
                }
                }
                else
                {
                       
format(stringsizeof(string), "%d nгo й o nъmero de ID de um player ativo!"giveplayerid);
                    
SendClientMessage(playeridAzulEscurostring);
                }
            }
            else
            {
              
SendClientMessage(playeridAzulEscuro"Vocк nгo й um Oficial/Militar para usar este comando !");
                return 
1;
            }
        }
        else
        {
            
SendClientMessage(playeridVermelho"Vocк tem que estar logado para usar este comando!");
        } 
Reply
#2

PHP код:
if(strcmp(cmd"/abordar"true) == || strcmp(cmd"/abordar"true) == 0
    { 
        
tmp strtok(cmdtextidx); 
        
giveplayerid strval(tmp); 
        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer)); 
        
GetPlayerName(playeridsendernamesizeof(sendername)); 
        
PlayerInfo[playerid][pBOPE] = dini_Int(udb_encode(sendername), "levelbope"); 
        
PlayerInfo[giveplayerid][pBOPE] = dini_Int(udb_encode(giveplayer), "levelbope"); 
        
giveplayerid strval(tmp); 
        if(!
strlen(tmp) && PlayerInfo[playerid][pBOPE] >= 1
        { 
            
SendClientMessage(playeridVerde"USO: /abordar [id do player]"); 
            return 
1
        } 
        if(
Logado[playerid] == 1
        { 
            if(
PlayerInfo[playerid][pBOPE] >= || PlayerInfo[playerid][pPM] >= 1
            { 
                if(
IsPlayerConnected(giveplayerid)) 
                { 
                  for(new 
i=0<= MAX_PLAYERSi++) 
                  if(
GetDistanceBetweenPlayers(playeridi) <= 20
                     { 
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer)); 
                    
GetPlayerName(playeridsendernamesizeof(sendername)); 
                   
// SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP); 
                    
freeze[giveplayerid] = 1
                    
format(stringsizeof(string), "O oficial %s abordou o jogador %s!"sendername,giveplayer); 
                    
SendClientMessageToAll(Amarelostring); 
                    
format(stringsizeof(string), "O oficial %s abordou vocк!"sendername); 
                    
SendClientMessage(giveplayeridAmarelostring); 
                    
GameTextForPlayer(giveplayerid"PARADO AI! POLICIA"50006);
                    new 
PlayerName[30]; 
                    
GetPlayerName(playeridPlayerName30); 
                    
printf("[Command] %s usou /abordar em %s."PlayerNamegiveplayer); 
                } 
                } 
                else 
                { 
                       
format(stringsizeof(string), "%d nгo й o nъmero de ID de um player ativo!"giveplayerid); 
                    
SendClientMessage(playeridAzulEscurostring); 
                } 
            } 
            else 
            { 
              
SendClientMessage(playeridAzulEscuro"Vocк nгo й um Oficial/Militar para usar este comando !"); 
                return 
1
            } 
        } 
        else 
        { 
            
SendClientMessage(playeridVermelho"Vocк tem que estar logado para usar este comando!"); 
        } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)