View Single Post
Old 22/10/2016, 03:35 PM   #3
LuanGamer
Big Clucker
 
Join Date: Oct 2016
Posts: 76
Reputation: 0
Default Re: Equipar não diminui os materiais

Opa então, o código abaixo não é simplesmente um /equipar(pois esse não funciona) mas acredito que é por ele que é usado quando você clica em equipar no infohq, e acredito que por ser um GivePlayerWeapon, ele não diminua nos materiais da org, segue código abaixo:

PHP Code:
CMD:equipar(playeridparams[])
    {
        new 
string[128];
        new 
tmpcar GetPlayerVehicleID(playerid);
        
GetPlayerName(playeridsendernameMAX_PLAYER_NAME);
          if(
IsAEnforcerCar(tmpcar)|| PlayerToPoint(2playerid,246.3115,121.0975,1003.2301) ||
          
PlayerToPoint(2playerid,262.0182,71.0734,1003.2422) ||
          
PlayerToPoint(2playerid,211.2608,185.8552,1003.0313) ||
          
PlayerToPoint(2playerid,230.0127,165.0615,1003.0234) ||
          
PlayerToPoint(2playerid,-1521.1884,462.9987,7.1875) ||
          
PlayerToPoint(2playerid,616.8616,-592.8971,17.2330) ||
          
PlayerToPoint(2playerid,359.1856,211.4973,1008.3828))
        {
            if(
PlayerInfo[playerid][pJailed] != 0)
            {
                
SendClientMessage(playerid,COLOR_GREY," Você não pode equipar na cadeia!");
                return 
true;
            }
            if((
PlayerInfo[playerid][pAdmin] && admtrampando[playerid]) || (PlayerInfo[playerid][pHelper] && helpertrampando[playerid]))
            return 
SendClientMessage(playeridCOLOR_GREY"Você precisa estar em modo jogo para equipar-se.");

            if(
InTaser[playerid] == true)
            {
                
SendClientMessage(playerid,COLOR_GREY," Você não pode equipar-se quando estiver com o taser em mãos!");
                   return 
true;
            }

            if(
gettime() < GetPVarInt(playerid"VarDano"))
                return 
SendClientMessage(playeridCOLOR_GRAD1," Você só poderá equipar 1 minuto após tomar dano de alguém !");

            if(
PlayerInfo[playerid][pLider] == || PlayerInfo[playerid][pLider] == ||
            
PlayerInfo[playerid][pLider] == 16 || PlayerInfo[playerid][pLider] == 11 ||
            
PlayerInfo[playerid][pLider] == 33|| PlayerInfo[playerid][pMembro] == ||
            
PlayerInfo[playerid][pMembro] == || PlayerInfo[playerid][pMembro] == 16 ||
            
PlayerInfo[playerid][pMembro] == 11 || PlayerInfo[playerid][pMembro] == 33 ||
            
GetPlayerOrg(playerid) == 35)
            {
                if(
PlayerInfo[playerid][pCargo] == || PlayerInfo[playerid][pCargo] == 444 || PlayerInfo[playerid][pCargo] == 555)
                {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
SetPlayerArmour(playerid100.0);
                       
SetPlayerHealth(playerid100.0);
                    
GivePlayerWeapon(playerid25140);
                    
GivePlayerWeapon(playerid24170);
                    
GivePlayerWeapon(playerid29510);
                    
GivePlayerWeapon(playerid31550);
                    
GivePlayerWeapon(playerid3480);
                    
GivePlayerWeapon(playerid1750);
                    
GivePlayerWeapon(playerid31);
                   }
                if(
PlayerInfo[playerid][pCargo] == 5)
                 {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerHealth(playerid100.0);
                    
GivePlayerWeapon(playerid25120);
                    
GivePlayerWeapon(playerid24360);
                    
GivePlayerWeapon(playerid29490);
                    
GivePlayerWeapon(playerid31);
                    
GivePlayerWeapon(playerid31400);
                    
GivePlayerWeapon(playerid3450);
                    
GivePlayerWeapon(playerid1740);
                }
                if(
PlayerInfo[playerid][pCargo] == 4)
                 {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerHealth(playerid100.0);
                    
GivePlayerWeapon(playerid25120);
                    
GivePlayerWeapon(playerid24360);
                    
GivePlayerWeapon(playerid29490);
                    
GivePlayerWeapon(playerid31);
                    
GivePlayerWeapon(playerid31400);
                    
GivePlayerWeapon(playerid3450);
                    
GivePlayerWeapon(playerid1740);
                }
                  if(
PlayerInfo[playerid][pCargo] == 3)
                {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                       
SetPlayerArmour(playerid100.0);
                       
SetPlayerHealth(playerid100.0);
                    
GivePlayerWeapon(playerid25190);
                    
GivePlayerWeapon(playerid24150);
                    
GivePlayerWeapon(playerid29450);
                    
GivePlayerWeapon(playerid31550);
                    
GivePlayerWeapon(playerid1730);
                    
GivePlayerWeapon(playerid3430);
                    
GivePlayerWeapon(playerid31);
                }
                 if(
PlayerInfo[playerid][pCargo] == 2)
                {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                       
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                       
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                      
SetPlayerArmour(playerid100.0);
                    
SetPlayerHealth(playerid100.0);
                    
GivePlayerWeapon(playerid2580);
                    
GivePlayerWeapon(playerid24150);
                    
GivePlayerWeapon(playerid31);
                    
GivePlayerWeapon(playerid29300);
                    
GivePlayerWeapon(playerid31300);
                    
GivePlayerWeapon(playerid1720);
                }
                 if(
PlayerInfo[playerid][pCargo] == 1)
                 {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
SetPlayerArmour(playerid100.0);
                    
SetPlayerHealth(playerid100.0);
                    
GivePlayerWeapon(playerid25190);
                    
GivePlayerWeapon(playerid24150);
                    
GivePlayerWeapon(playerid29450);
                    
GivePlayerWeapon(playerid31550);
                    
GivePlayerWeapon(playerid1730);
                    
GivePlayerWeapon(playerid31);
                }
               }
            if(
PlayerInfo[playerid][pLider] == 3)
            {
                
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                
ResetPlayerWeapons(playerid);
                
TempDropArmasBody[playerid] = 0;
                
SetPlayerArmour(playerid100.0);
                
SetPlayerHealth(playerid100.0);
                
GivePlayerWeapon(playerid25500);
                
GivePlayerWeapon(playerid24500);
                
GivePlayerWeapon(playerid31600);
                
GivePlayerWeapon(playerid29600);
                
GivePlayerWeapon(playerid1710);
                
GivePlayerWeapon(playerid34100);
                return 
true;
            }
            if(
PlayerInfo[playerid][pMembro] == 3)//Exército
               
{
                   
SetPlayerArmour(playerid100.0);
                
SetPlayerHealth(playerid100.0);
                
GivePlayerWeapon(playerid41);
                if(
PlayerInfo[playerid][pCargo] == 1)
                {
                    
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
GivePlayerWeapon(playerid2580);
                    
GivePlayerWeapon(playerid2480);
                    
GivePlayerWeapon(playerid31300);
                    
GivePlayerWeapon(playerid29300);
                    
GivePlayerWeapon(playerid1710);
                    return 
true;
                }
                   if(
PlayerInfo[playerid][pCargo] == 2)
                {
                       
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
GivePlayerWeapon(playerid2580);
                    
GivePlayerWeapon(playerid24150);
                    
GivePlayerWeapon(playerid29300);
                    
GivePlayerWeapon(playerid31400);
                    
GivePlayerWeapon(playerid1720);
                    return 
true;
                }
                  if(
PlayerInfo[playerid][pCargo] == 3)
                   {
                      
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
GivePlayerWeapon(playerid25190);
                    
GivePlayerWeapon(playerid24150);
                    
GivePlayerWeapon(playerid29450);
                    
GivePlayerWeapon(playerid31550);
                    
GivePlayerWeapon(playerid1730);
                    
GivePlayerWeapon(playerid3425);
                    return 
true;
                }
                if(
PlayerInfo[playerid][pCargo] == 4)
                {
                    
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
GivePlayerWeapon(playerid25120);
                    
GivePlayerWeapon(playerid24360);
                    
GivePlayerWeapon(playerid29490);
                    
GivePlayerWeapon(playerid31400);
                    
GivePlayerWeapon(playerid1740);
                    
GivePlayerWeapon(playerid3450);
                    return 
true;
                }
                if(
PlayerInfo[playerid][pCargo] == || PlayerInfo[playerid][pCargo] == 444 || PlayerInfo[playerid][pCargo] == 555)
                {
                    
format(stringsizeof(string), "* %s se equipou."PlayerName(playerid));
                    
SendClientMessageInRange(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                    
ResetPlayerWeapons(playerid);
                    
TempDropArmasBody[playerid] = 0;
                    
GivePlayerWeapon(playerid25140);
                    
GivePlayerWeapon(playerid24170);
                    
GivePlayerWeapon(playerid29510);
                    
GivePlayerWeapon(playerid31550);
                    
GivePlayerWeapon(playerid1750);
                    
GivePlayerWeapon(playerid34100);
                    return 
true;
                }
            }
        }
        if(
PlayerInfo[playerid][pMembro] == 20 || PlayerInfo[playerid][pLider] == 20)//Bombeiros
         
{
             if(
PlayerToPoint(2.0playerid,1496.9415,-1509.9282,14.1453))
            {
                 if(
PlayerInfo[playerid][pCargo] >= 1)
                      {
                            
format(stringsizeof(string), "[BOMBEIRO]: %s se equipou."sendername);
                            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            
SendClientMessage(playerid,COLOR_LIGHTBLUE,"*** Você pegou seus equipamentos de acordo com o seu cargo!");
                            
ResetPlayerWeapons(playerid);
                            
TempDropArmasBody[playerid] = 0;
                            
SetPlayerArmour(playerid100.0);
                               
SetPlayerHealth(playerid100.0);
                            
GivePlayerWeapon(playerid425000);
                            
GivePlayerWeapon(playerid91);
                            return 
1;
                    }
            }
        }
         return 
true;
    } 
LuanGamer is offline   Reply With Quote