RHGames Posted February 26, 2019 Share Posted February 26, 2019 I need some help with inventory, i dont know how i can make, somebody can help me Link to comment
Ab-47 Posted March 9, 2019 Share Posted March 9, 2019 Just figure out a structure, You want a GUI to handle the inventory, do you want it triggered by a marker or command handler? You want the system to hold the data, you could use SQL (executeSQLQuery) to add items for specific users into a table such as "inventory". You want to remove players weapons/drugs/money or whatever, search wiki.multitheftauto.com > client / server functions. - For weapons use https://wiki.multitheftauto.com/wiki/TakeWeapon or https://wiki.multitheftauto.com/wiki/SetWeaponAmmo - For drugs (if you have a system) you would need to find out how your system is being used, element data? SQL? File? - - For element data, setElementData(thePlayer, "drugsData", "newData" or num [or currentDrugs - inventoryInputDrugs]) - - For SQL, use executeSQLQuery. Example: executeSQLQuery("UPDATE inventory SET drugs=?, money=? WHERE playerName=?", currentDrugs-insertDrugs, oldMoney-insertMoney, getPlayerName(player)) You would then want to add all the data upon retrieval, just do the opposite of what I mentioned above. You gotta start somewhere, follow up on your progress and if you need any assistance, you could just reply here and I'm sure allot of us are happy to help. Goodluck. 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