Jump to content

[Duvida] Pega Arma Pistola Dupla


Recommended Posts

setPedStat 

-- Leia o exemplo na Wiki.

Para colocar duas Colt 45, use: setPedStat(Player_Aqui, 69, 999)

na verdade o terceiro parâmetro é 1000 ao invés de 999..

já trabalhei muito com esta função setPedStat aonde já coloquei 999 e não ficava nas 2 mãos

resolvi colocar 1000 e deu certo :roll:

setPedStat(Player_Aqui, 69, 999) -- parâmetro do AndreiSR 

setPedStat(thePlayer, 69, 1000) -- meu 

Link to comment

Muito Obrigado Pessoal :D

---

Vou Testa Dessa Forma que voces Passarão

Forma que eu Tava Usando:

  
-- Aumentando Numero de Balas 
addEventHandler("onPlayerWeaponSwitch",getRootElement(),function(previousWeaponID,currentWeaponID) 
   local current_1 = getElementData(source,"currentweapon_1") 
   local current_2 = getElementData(source,"currentweapon_2") 
   local current_3 = getElementData(source,"currentweapon_3") 
   if currentWeaponID == 23 and current_2 == "M9 SD" then 
      setWeaponProperty("23","poor","maximum_clip_ammo",15) 
      setWeaponProperty("23","std","maximum_clip_ammo",15) 
      setWeaponProperty("23","pro","maximum_clip_ammo",15)  
      -- Test:  
      setWeaponProperty("23","pro","flags",0x000800) 
      setWeaponProperty("23","pro","flags",0x000002) 
      setWeaponProperty("22","pro","weapon_range",700)     
   elseif currentWeaponID == 22 and current_2 == "M1911" then 
      setWeaponProperty("22","poor","maximum_clip_ammo",17) 
      setWeaponProperty("22","std","maximum_clip_ammo",17) 
      setWeaponProperty("22","pro","maximum_clip_ammo",17) 
      -- Test:  
      setWeaponProperty("22","poor","weapon_range",700) 
      setWeaponProperty("22","std","weapon_range",700) 
      setWeaponProperty("22","pro","weapon_range",700) 
   elseif currentWeaponID == 24 and current_2 == "Desert Eagle" then 
      setWeaponProperty("24","poor","maximum_clip_ammo",6) 
      setWeaponProperty("24","std","maximum_clip_ammo",6) 
      setWeaponProperty("24","pro","maximum_clip_ammo",6) 
   elseif currentWeaponID == 28 and current_2 == "PDW" then 
      setWeaponProperty("28","poor","maximum_clip_ammo",30) 
      setWeaponProperty("28","std","maximum_clip_ammo",30) 
      setWeaponProperty("28","pro","maximum_clip_ammo",30) 
   elseif currentWeaponID == 29 and current_2 == "MP5A5" then 
      setWeaponProperty("29","poor","maximum_clip_ammo",30) 
      setWeaponProperty("29","std","maximum_clip_ammo",30) 
      setWeaponProperty("29","pro","maximum_clip_ammo",30)     
-- Shotguns   
   elseif currentWeaponID == 25 and current_1 == "Winchester 1866" then 
      setWeaponProperty("25","poor","maximum_clip_ammo",4) 
      setWeaponProperty("25","std","maximum_clip_ammo",4) 
      setWeaponProperty("25","pro","maximum_clip_ammo",4) 
   elseif currentWeaponID == 27 and current_1 == "SPAZ-12 Combat Shotgun" then 
      setWeaponProperty("27","poor","maximum_clip_ammo",8) 
      setWeaponProperty("27","std","maximum_clip_ammo",8) 
      setWeaponProperty("27","pro","maximum_clip_ammo",8)  
-- M4's  
   elseif currentWeaponID == 31 and current_1 == "М4А1 Holo" then 
      setWeaponProperty("31","poor","maximum_clip_ammo",30) 
      setWeaponProperty("31","std","maximum_clip_ammo",30) 
      setWeaponProperty("31","pro","maximum_clip_ammo",30)   
   elseif currentWeaponID == 31 and current_1 == "М4А1 CCO" then 
      setWeaponProperty("31","poor","maximum_clip_ammo",20) 
      setWeaponProperty("31","std","maximum_clip_ammo",20) 
      setWeaponProperty("31","pro","maximum_clip_ammo",20) 
   elseif currentWeaponID == 31 and current_1 == "М4А1 Xmas 2015" then 
      setWeaponProperty("31","poor","maximum_clip_ammo",20) 
      setWeaponProperty("31","std","maximum_clip_ammo",20) 
      setWeaponProperty("31","pro","maximum_clip_ammo",20) 
   elseif currentWeaponID == 31 and current_1 == "M4A1 CCO SD" then 
      setWeaponProperty("31","poor","maximum_clip_ammo",30) 
      setWeaponProperty("31","std","maximum_clip_ammo",30) 
      setWeaponProperty("31","pro","maximum_clip_ammo",30)     
-- Ak's   
   elseif currentWeaponID == 30 and current_1 == "AK-74" then 
      setWeaponProperty("30","poor","maximum_clip_ammo",30) 
      setWeaponProperty("30","std","maximum_clip_ammo",30) 
      setWeaponProperty("30","pro","maximum_clip_ammo",30)  
   elseif currentWeaponID == 30 and current_1 == "AK-101" then 
      setWeaponProperty("30","poor","maximum_clip_ammo",30) 
      setWeaponProperty("30","std","maximum_clip_ammo",30) 
      setWeaponProperty("30","pro","maximum_clip_ammo",30)     
-- Armas Pesadas 
   elseif currentWeaponID == 30 and current_1 == "Mk 48 Mod 0" then 
      setWeaponProperty("30","poor","maximum_clip_ammo",100) 
      setWeaponProperty("30","std","maximum_clip_ammo",100) 
      setWeaponProperty("30","pro","maximum_clip_ammo",100) 
   elseif currentWeaponID == 30 and current_1 == "PKP" then 
      setWeaponProperty("30","poor","maximum_clip_ammo",100) 
      setWeaponProperty("30","std","maximum_clip_ammo",100) 
      setWeaponProperty("30","pro","maximum_clip_ammo",100) 
-- Rifles e Snipers e Misc     
   elseif currentWeaponID == 33 and current_1 == "Lee Enfield" then 
      setWeaponProperty("33","poor","maximum_clip_ammo",5) 
      setWeaponProperty("33","std","maximum_clip_ammo",5) 
      setWeaponProperty("33","pro","maximum_clip_ammo",5) 
   elseif currentWeaponID == 34 and current_1 == "DMR" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5) 
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)         
   elseif currentWeaponID == 34 and current_1 == "PGM Hecate II" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",7) 
      setWeaponProperty("34","std","maximum_clip_ammo",7) 
      setWeaponProperty("34","pro","maximum_clip_ammo",7) 
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",1000) 
      setWeaponProperty("34","std","weapon_range",1000) 
      setWeaponProperty("34","pro","weapon_range",1000)    
   elseif currentWeaponID == 34 and current_1 == "M24" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5) 
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)     
   elseif currentWeaponID == 34 and current_1 == "AS50" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5) 
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)     
   elseif currentWeaponID == 34 and current_1 == "AS50 TWS" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5)    
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)     
   elseif currentWeaponID == 34 and current_1 == "M40A3" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5) 
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)     
   elseif currentWeaponID == 34 and current_1 == "CZ550" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5) 
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)     
   elseif currentWeaponID == 34 and current_1 == "MDX-9B" then 
      setWeaponProperty("34","poor","maximum_clip_ammo",5) 
      setWeaponProperty("34","std","maximum_clip_ammo",5) 
      setWeaponProperty("34","pro","maximum_clip_ammo",5)    
      -- Test:  
      setWeaponProperty("34","poor","weapon_range",700) 
      setWeaponProperty("34","std","weapon_range",700) 
      setWeaponProperty("34","pro","weapon_range",700)     
   elseif currentWeaponID == 33 and current_1 == "Compound Crossbow" then 
      setWeaponProperty("33","poor","maximum_clip_ammo",1) 
      setWeaponProperty("33","std","maximum_clip_ammo",1) 
      setWeaponProperty("33","pro","maximum_clip_ammo",1)     
-- Outros 
   elseif currentWeaponID == 43 and current_3 == "Binoculars" then 
      setWeaponProperty("43","pro","flags",0x002000) 
      setWeaponProperty("43","pro","flags",0x000010) 
      setWeaponProperty("43","pro","flags",0x000020)       
   end 
end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...