Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 19/05/21 in Posts

  1. I tried the code and i have an error, the problem is the function comes after the handler, place the function before.
    1 point
  2. Im not sure why it doesnt work, any errors in debug?
    1 point
  3. local myButton = -- your button code addEventHandler("onClientGUIClick", myButton, myFunction, false) -- this event call the function when the button is clicked function myFunction() -- what to do when the button is clicked end addCommandHandler ( "z", myFunction )
    1 point
  4. You can call the function which handles the onClientGUIClick event.
    1 point
  5. Hello, idk if it will work but you can try with triggerEvent()
    1 point
  6. Use 'client' instead 'zplayer' (https://wiki.multitheftauto.com/wiki/TriggerServerEvent) Zplayer on server-side is not an argument, its a root
    1 point
  7. Hi everyone! I want to offer for sale a Advanced Drug System that can be the perfect DLC for your Roleplay server. The Advanced Drug System is a system designed to bring realism to your city. This Mod allows you to be a drug dealer. The system works by ACL protection, ensuring the security and efficiency of the Mod, selecting the people who will have access to the system. The drug dealer can sell up to 5 different types of drugs: - Marihuana - Cocaine - Crack - Crystal - Ecstasy Each drug has a different psychedelic effect when used and the time it gets stoned is random, which can be a quick or long wave. Marijuana plantation system to be able to plant and process marijuana. Illegal drug store exclusively for those at ACL, with the option to buy Cocaine, Crack, Ecstasy and Crystal. Command /selldrugs to create a Marker and start selling drugs to nearby players. Key bind to open the Drug Inventory, configurable in Edit. Edit script to customize the main Mod settings. Useful commands: - /setdrugs id drugname quantity - Set drugs for a player. (Example: / setdrugs 1 marijuana 50) (Permission only for ACL Admin and Console) Name of the drugs: marijuana crack cocaine ecstasy crystal. - /drugs - Opens the drug inventory. - /selldrugs - Command for a trafficker use to open the drug store. - /plantmarijuana - Starts the planting of marijuana on the farm ------------- Screenshots of the Mod: Requirements ID System (Included on the resource package) This resource is compiled Buy it Payment with Paypal using PayHip and get the Download file Buy it fast and safe here: https://payhip.com/b/29uR Or send $30 to [email protected] with Paypal and i will send the Mod File to your E-mail. Other products: Advanced Medical System MTA Forum Contact Website Facebook Page E-MAIL: [email protected]
    1 point
  8. Cool, excepcional functions !
    1 point
  9. There is no problem using element data. Just try to limit the amount of data you have laying around if you don't really need it. This goes to both methods, tables or element data, limit the amount of data where possible! Just one security related thing to element data though, you need to make sure you don't allow changing element data if it wasn't done by the server. You can read more on how here: https://wiki.multitheftauto.com/wiki/Script_security#Validating_client_setElementData I usually just carry an ID on elements that have an entry in the database so I can fetch/save data from/to a database for that specific element. Some data that you will be accessing a lot is better to have cached in element data or tables rather than always make a database query when you need it, but this depends on how you edit data. If you for example edit data through the database or a control panel somewhere, the data might get out of sync with what is stored in a table or element data. So it depends on your situation, really. I'd go with element data, but keep in mind script security as I linked above. Also to keep in mind, is if you store things in a table, all of that data will be lost upon resource restart, whereas element data will stay if the element is not deleted by the stopping resource or something else. This I think is one of the good sides about element data.
    1 point
×
×
  • Create New...