[Ajuda] Ajuda Com /rbrall /rbqallІ
#1

Aew Galera Ja Que Niguem me Ajuda Vo Repetir Meu Problema!! Tipo Quando Um Lнder De Org De Policia Digita /rbrall ou /rbrall que significa /rbrall= Remover Todas Barreiras /rbqall= Remover Todos Bloqueios.

Bom Quando um Lider De Org Policia Digita /rbrall ele remove todas as barreiras do server mais eu queria saber se tem como ele apenas remover as barreiras da org dele.

ai quando ele fosse digitar /rbrall aparecia "Todas as Barreias Da B.O.P.E Foram Tiradas Por Fulanode_Tal"

Bom EU Ja Consegui Criar O anuncio de quando o cara for digitar o /rbrall ou /rbqall e aparecer "Todas as Barreias da B.O.P.E Foram Tiradas Por Fulanode_Tal"

Comandos

/rbqall

PHP код:
      if(strcmp(cmd"/removerbloqueioall"true)==|| strcmp(cmd"/rbqall"true)==0
    { 
    if (
PlayerInfo[playerid][pLider] != && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pLider] != 2  && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pLider] != && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pLider] != 11 && PlayerInfo[playerid][pCargo] != 
     
&& PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pAdmin] >= && GetPlayerOrg(playerid) != && GetPlayerOrg(playerid) != && GetPlayerOrg(playerid) != && GetPlayerOrg(playerid) != 11 && GetPlayerOrg(playerid) != 16 && IsACop(playerid)) return SendClientMessage(playeridCOLOR_GREY"Vocк nгo й um oficial ou Seu Cargo e Baixo !"); 
    { 
    for(new 
0MAX_PLAYERSi++) 
    { 
                if(
IsPlayerConnected(i)) 
                { 
                    if(
pRoadCones[i] != 0
                    { 
                        
RemoveRoadCones(i); 
                    } 
                } 
            } 
            
format(stringsizeof(string), "Todos Os Bloqueios Da %s Foram Tirados Por %s. ID:[%d]"NomeORG(playerid), PlayerName(playerid), playerid); 
            for(new 
0MAX_PLAYERSi++) 
            { 
                if(
IsPlayerConnected(i)) 
                { 
                    if(
IsACop(i)) 
                    { 
                        
SendClientMessage(iTEAM_BLUE_COLORstring); 
                    } 
                } 
            } 

return 
true

/rbrall

PHP код:
     if(strcmp(cmd"/removertodasbarreiras"true)==|| strcmp(cmd"/rbrall"true)==0
    { 
     if (
PlayerInfo[playerid][pLider] != && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pLider] != 2  && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pLider] != && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pLider] != 11 && PlayerInfo[playerid][pCargo] != 
      
&& PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pCargo] != && PlayerInfo[playerid][pAdmin] >= && GetPlayerOrg(playerid) != && GetPlayerOrg(playerid) != && GetPlayerOrg(playerid) != && GetPlayerOrg(playerid) != 11 && GetPlayerOrg(playerid) != 16 && IsACop(playerid)) return SendClientMessage(playeridCOLOR_GREY"Vocк nгo й um oficial ou Seu Cargo e Baixo !"); 
        { 
            for(new 
0MAX_PLAYERSi++) 
            { 
                if(
pRoadblock[i] != 0
                { 
                    
RemoveRoadblock(i); 
                } 
            } 
            
format(stringsizeof(string), "Todos Os Bloqueios Da %s Foram Tirados Por %s. ID:[%d]"NomeORG(playerid), PlayerName(playerid), playerid); 
            for(new 
0MAX_PLAYERSi++) 
            { 
                if(
IsPlayerConnected(i)) 
                { 
                    if(
IsACop(i)) 
                    { 
                        
SendClientMessage(iTEAM_BLUE_COLORstring); 
                    } 
                } 
            } 
          } 
        return 
true
    } 
Reply
#2

Antes de tudo, se ninguйm te ajude vб atrбs das respostas. Aqui jб й cheio de sangue-suga que nгo consegue codar se quer um cуdigo sem depender dos outros, nгo seja mais um.

@soluзгo
Nгo sei se irб funcionar, mais no cуdigo mostra uma funзгo chamaga GetPlayerOrg, ela deve retornar o ID da organizaзгo do playerid passado por parвmetro, pois bem, sendo que ele faz um FOR em todos os jogadores do servidor e verifica se existe uma barreira... Era so aproveitar esse for e fazer uma condiзгo se a org do ID atual do for for igual a ORG de quem estб usando o comando. Se vocк botasse a cabeзa para funcionar e nгo dependesse dos outros notaria isso fбcil
Код:
 if(strcmp(cmd, "/removertodasbarreiras", true)==0 || strcmp(cmd, "/rbrall", true)==0)  
    {  
     if (PlayerInfo[playerid][pLider] != 1 && PlayerInfo[playerid][pCargo] != 5 && PlayerInfo[playerid][pLider] != 2  && PlayerInfo[playerid][pCargo] != 5 && PlayerInfo[playerid][pLider] != 3 && PlayerInfo[playerid][pCargo] != 5 && PlayerInfo[playerid][pLider] != 11 && PlayerInfo[playerid][pCargo] != 5  
      && PlayerInfo[playerid][pLider] != 16 && PlayerInfo[playerid][pCargo] != 5 && PlayerInfo[playerid][pAdmin] >= 1 && GetPlayerOrg(playerid) != 1 && GetPlayerOrg(playerid) != 2 && GetPlayerOrg(playerid) != 3 && GetPlayerOrg(playerid) != 11 && GetPlayerOrg(playerid) != 16 && IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um oficial ou Seu Cargo e Baixo !");  
        {  
            for(new i = 0; i < MAX_PLAYERS; i++)  
            {  
                if(pRoadblock[i] != 0 && GetPlayerOrg(playerid) == GetPlayerOrg(i))  
                {  
                    RemoveRoadblock(i);  
                }  
            }  
            format(string, sizeof(string), "Todos Os Bloqueios Da %s Foram Tirados Por %s. ID:[%d]", NomeORG(playerid), PlayerName(playerid), playerid);  
            for(new i = 0; i < MAX_PLAYERS; i++)  
            {  
                if(IsPlayerConnected(i) && GetPlayerOrg(playerid) == GetPlayerOrg(i))  
                {  
                     SendClientMessage(i, TEAM_BLUE_COLOR, string);  
                }  
            }  
          }  
        return true;  
    }
Reply
#3

Vlw Joгo Pedro Funcionou Direitinho Sу Nгo Precisava Exculaxar!
Reply
#4

Quote:
Originally Posted by lucasbjs0
Посмотреть сообщение
Vlw Joгo Pedro Funcionou Direitinho Sу Nгo Precisava Exculaxar!
O cara n te exculachou mano, isso й pro teu bem ainda, ou vocк quer ficar dependendo dos outros pra qualquer problema que vocк tiver? Estuda cara.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)