Fantanic Posted March 5, 2014 Posted March 5, 2014 Hello , I wanna make a weapon storage (small panel ) so i want to store some weapons in a gui for example if u do /storage (just example) then u get 2 collums , one with Youre weapons and second one with Storage of the weapons So my question is , wich functions do i need to make? (i already made the gui)
Moderators Citizen Posted March 6, 2014 Moderators Posted March 6, 2014 Ok so what you want to do is a storage system to put and get weapons in/from it right ? If so, then you will need 2 gridlists in your gui (one to list the player's weapons with 2 columns (Weapon name and Ammos) and another to list the weapons the storage has). It sounds like you only have 1 gridlist, it's possible but only if you don't plan to show the ammount of ammos. You will have to do a function that will return all the weapons (and their ammos if needed). getPedWeapon or getPedWeapons --you can modify the second function to return the ammos as well. getPedTotalAmmo And this is the functions you need to work with gridlists: guiGridListAddRow guiGridListSetItemText getWeaponNameFromID addEventHandler --the event "onClientGUIClick" guiGetSelectedItem guiGridListGetItemText getWeaponIDFromName giveWeapon --You need to use triggerServerEvent, addEvent and addEventHandler to be able to call it from client-side takeWeapon --Same for this one And I guess it's pretty much it.
Fantanic Posted March 6, 2014 Author Posted March 6, 2014 Ok i pause the object above a little bit ; if colR1 and colG1 and colB1 and colR2 and colG2 and COLB2 then setVehicleColor(vehicle, colR1, colG1, colB1, colR2, colG2, colB2) is this correct if i got this ; local colR1 = node["r1"] local colG1 = node["g1"] local colB1 = node["b1"] local colR2 = node["r2"] local colG2 = node["g2"] local colB2 = node["b2"] so it sets the color wich is write at colg2 etc (its like R G B)
Moderators IIYAMA Posted March 6, 2014 Moderators Posted March 6, 2014 Mind your capitals from your variables. COLB2 > colB2
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