Jump to content

How i can make the inventory? I dont know. Please i need some help


RHGames

Recommended Posts

  • 2 weeks later...

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

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...