Malicious Hero. Posted May 12, 2013 Author Share Posted May 12, 2013 Try it add item to your inventory and then drag it away and you can drag how much you want lol. I've tested that before I even released it. Worked perfectly fine. The others who I also tested it with didn't notice it either. Link to comment
manawydan Posted August 26, 2013 Share Posted August 26, 2013 -- exportando inventario --exports [ "heroinventory" ]:addInventoryGroup( "Armas", "Armas.png" ) --exports [ "heroinventory" ]:addInventoryGroup( "Itens", "Itens.png" ) function InventarioSpawn() exports [ "heroinventory" ]:addPlayerItem(source,1,1) exports [ "heroinventory" ]:addPlayerItem(source,2,1) exports [ "heroinventory" ]:addPlayerItem(source,3,1) exports [ "heroinventory" ]:addPlayerItem(source,4,1) end addEventHandler("onPlayerSpawn",getRootElement(),InventarioSpawn) function UsarItemInventario(ID,qu) if ID == 1 and getPedWeapon (source) == 22 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,1,1) setWeaponAmmo(source,22,getPedTotalAmmo(source)+17) setPedAnimation( source, "COLT45", "colt45_reload",-1000,false) AnimacaoNula(source,1000) elseif ID == 2 and getPedWeapon (source) == 25 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,2,1) setWeaponAmmo(source,25,getPedTotalAmmo(source)+7) setPedAnimation( source, "BUDDY", "buddy_reload",-1700,false) AnimacaoNula(source,1700) elseif ID == 3 and getPedWeapon (source) == 34 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,3,1) setWeaponAmmo(source,34,getPedTotalAmmo(source)+5) setPedAnimation( source, "BUDDY", "buddy_reload",-1700,false) AnimacaoNula(source,1700) elseif ID == 4 and getPedWeapon (source) == 29 or getPedWeapon (source) == 28 or getPedWeapon (source) == 32 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,4,1) local Wid = getPedWeapon (source) setWeaponAmmo(source,Wid,getPedTotalAmmo(source)+math.random(10,20)) setPedAnimation( source, "UZI", "UZI_reload",-1500,false) AnimacaoNula(source,1500) end end addEvent("onPlayerUseItem",true) addEventHandler("onPlayerUseItem",getRootElement(),UsarItemInventario) function AnimacaoNula(source,Tempo) setTimer(setPedAnimation,Tempo,1,source,nil) end I have a problem. Even after the item away (vanish), the player can still click and get more. obs: I added the group "armas" in inventories (heroinventory). Link to comment
Mach Posted November 23, 2013 Share Posted November 23, 2013 Wow mate, It's epic Nice work bro! Link to comment
off Posted January 4, 2014 Share Posted January 4, 2014 HELP? The items are not showing up. ERROR: HeroInventory\server\s_exports.lua:81: attempt to index field '?' <a nil value> Link to comment
Ma5ter Posted June 19, 2014 Share Posted June 19, 2014 ERROR: HeroInventory\server\s_exports.lua:81: attempt to index field '?' <a nil value> I cannot add vehicles or anything I use. Link to comment
lcd12321 Posted August 25, 2014 Share Posted August 25, 2014 if i add group and then restart server writes server triggered clientside event updateInventoryGroups, but event is not added clientside Link to comment
Nighttrain Posted August 25, 2014 Share Posted August 25, 2014 how to let players use it? because i have instal the script and it works, but how about when they buy a skin? (sorry i am a Starter with Scripts and Scripting) Link to comment
darhal Posted January 13, 2015 Share Posted January 13, 2015 I will ask quetion from where you get those nice pictures ? Plz help if you made them so how and which software u use ? Link to comment
LaCosTa Posted January 14, 2015 Share Posted January 14, 2015 Very good man i loved your job . Link to comment
darhal Posted January 14, 2015 Share Posted January 14, 2015 Key word plz or the site Link to comment
Edmund Posted March 3, 2017 Share Posted March 3, 2017 can any one help me how to create ped sell that items? because i try 3 day about that but usesless Link to comment
Jawad135 Posted January 9, 2019 Share Posted January 9, 2019 How to create the group? and where should I put it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now