Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. I suggest you read the getRootElement's wiki page, it will help explain a bit. getRootElement
  2. JR10

    [HELP] Please :x

    Let alone that you're comparing a table (handling) to a number. There is no event for changing any of the handling data of a car. You will have to add the check code (or triggerEvent) to the part where the player changes the mass of the vehicle.
  3. JR10

    Saving

    Google what SQL is, this should give you a basic understanding of what it is. Check this when you're done: viewtopic.php?f=148&t=38203
  4. That is exactly what you need. You can't "refresh" a statement. onClientElementDataChange will be triggered whenever an element's data change. You can detect when canITriggerIt gets changed and recheck the value.
  5. JR10

    Saving

    Take a look at the community resources, you will find a lot of save systems. https://community.multitheftauto.com/index.php?p= ... ils&id=732 https://community.multitheftauto.com/index.php?p= ... s&id=10588 https://community.multitheftauto.com/index.php?p= ... ls&id=2561
  6. A simple search on the forums and you will find a plethora of topics related to what you need. viewtopic.php?f=91&t=82677&p=753736&hilit=dx+text+resolution#p753736
  7. JR10

    Create a bank

    I'm not entirely sure what you're onto, but, setElementInterior only takes two parameters, the element and the interior. 3 is the id of the interior, its ordered number in the list of added interiors. 12 is the actual interior. setElementInterior(bankPed, 12)
  8. Your script is kinda messy. You're using element data in an invalid way. Check the wiki for the correct syntax. setElementData(element, "data_key", data) Also, you're not really passing any arguments to onaccept(). Finally, read this: viewtopic.php?f=91&t=47897
  9. dxDrawText You can easily calculate the relative resolution between yours (which the text should be perfect on) and the client's. Of course there are other ways.
  10. JR10

    information

    getScreenFromWorldPosition dxDrawText Look at the example in getScreenFromWorldPosition's wiki page, it will help you understand the function a bit.
  11. You need to add the event server-side and handle it. addEvent("onClientProceedToRecover", true) addEventHandler("onClientProceedToRecover", root, function() -- code end)
  12. No. You would use it like this: exports.resource:hide_hideGUI()
  13. You can define an alias for the function and export the alias. hide_hideGUI = hide.hideGUI <export function="hide_hideGUI" type="client"/>
  14. https://wiki.multitheftauto.com/wiki/TriggerServerEvent In any Lua code on the forums you can click the functions which will direct you to its respective wiki pages.
  15. The second parameter of triggerServerEvent is a baseElement. If you pass the localPlayer in triggerServerEvent as the second argument, it will be sent as the predefined variable source, so in giveClientLeaderName, 'source' is the localPlayer. This is discouraged though as it is vulnerable to event-faking. Read the wiki page for more info.
  16. I'm not sure what's the problem, when you destroy a vehicle it's logical that the players will get removed. Perhaps I didn't understand. You should post the code so we can help you with it. Read this: viewtopic.php?f=91&t=47897
  17. JR10

    math.round

    @unpredictable A useful function. https://wiki.multitheftauto.com/wiki/Math.round
  18. It's up again, check the first post for the download link. It might be slightly outdated and I lost the generator app. I will rewrite it and update this soon.
  19. Are you sure you're not editing the acl file while the server is up? Make sure that you shut down the server before editing the file. MrTasty mentioned aclReload, try that.
  20. You could use a database to store all the names related to a certain serial, load the database on start and store the data in a table. You could then append to it any new names and update the database.
  21. Why a database? A simple HTTP export to get the number of players and the map name would be just fine.
  22. The text.lua script type is not set to client. Edit the meta.xml file and change the script type to 'client'. guiSetText sets the text of an element, but it doesn't create the element. You need to replace it with guiCreateLabel.
  23. This should help: https://wiki.multitheftauto.com/wiki/Se ... ting_names To get a setting from a different resource you need: get("resourceName.settingName") For different access modifiers, check the link.
  24. JR10

    INV Sys

    You need to set both of the accountname and itemname to unique. It's simple really: INSERT OR REPLACE INTO evanter (accountname, itemname, friendlyname, amount, itemtype) VALUES (ACCOUNTNAME, ITEMNAME, FRIENDLYNAME, AMOUNT, TYPE) Also, in your original code, this query string is wrong: INSERT INTO envanter (id,accountname,itemname,friendlyname,amount,itemtype) VALUES(NULL,'1','1','1','1','1'",accountname,itemname,accountname,itemname) You selected 6 columns to insert a value for, yet you send 10 values.
×
×
  • Create New...