Jump to content

DiSaMe

Helpers
  • Posts

    1,449
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by DiSaMe

  1. Also, don't concatenate the values into the string yourself. Let dbQuery take care of this by putting ? or ?? in the places of values in the string and passing the values as separate arguments. Otherwise players will be able to inject the code into queries.
  2. DiSaMe

    Solved

    You're triggering the event without adding it with addEvent first. Apart from that, the client-side script starts after onPlayerJoin has already been triggered in the server, so simply putting triggerClientEvent in onPlayerJoin will not work.
  3. That's nice. I have thought of making the same for Blender. If I did that, I would make .dff and .col import/export scripts too.
  4. That means distanceFromPlayerToCheckpoint returns nil.
  5. Only the local player.
  6. result[row_number].column_name result is a table returned by dbPoll.
  7. dbQuery dbPoll And a SELECT statement in dbQuery, of course.
  8. No, you don't. Single SQL statement can insert multiple rows into the table.
  9. You cannot technically 'create' a spawn point - such thing does not exist in MTA itself. The thing which exists is a function: spawnPlayer You can use it to script the spawn points (if you're making your own gamemode) - that's where the true simplicity comes from There's also a Spawnmanager resource (basic spawn point functions) among the standard MTA resources. If you use another gamemode, it may have its own specific spawn system or use the Spawnmanager resource. SA-MP scripting looked easier to me when I had just come to MTA, but when I got familiar with MTA scripting, I had no problems with it. In contrast, when I tried some SA-MP scripting a few months ago after a long break, it was really confusing. After all, SA-MP may have some things easier to make, but often at the cost of reduced flexibility. For example, you may just call a function to make a GUI window show up. In MTA, you need to create the parts of the window (such as buttons, text fields) yourself, what needs more than one function call, but in exchange, you have the freedom to make the window contain whatever you want
  10. Client-side script means a script that runs on the client's computer, not something that doesn't work with multiple clients. If client was unaware of other clients, it wouldn't be multiplayer.
  11. Because the client is aware of other players entering the marker.
  12. Probably because you have a syntax error clearly visible in the middle of this script.
  13. Nothing is removed. Your script searches for existing clan node and changes its name instead of creating another node.
  14. It may be counterintuitive, but not "illogical" - it's explained why it works that way: https://wiki.multitheftauto.com/wiki/EngineImportTXD
  15. No, don't do this. Doing this means assuming that the client-side script is guaranteed to start in 100 ms. This assumption is incorrect.
  16. Nice. Relativity is a really interesting part of physics. Too bad that time dilation cannot be done with multiple players
  17. When resource starts on the server, there's no way for it to have started and added an event on the client. You have to make sure that script is already running on the client when you trigger an event. There are easier ways to pass the element, such as using element ID functions: setElementID getElementByID It's simple, you set the element ID server-side and get the element from ID on the client. Then you can use setPedControlState on it.
  18. Export the texture in format which MTA DX functions can use (such as PNG) and then make a shader which applies the image to bandana texture on player models.
  19. Does unpackbriefmark return 3 values?
  20. You're trying to delete the children of this node: clan="FBI">> Since it contains no children, nothing is deleted. It happens this way because xmlFileLoad returns this node: >...> And then you're getting its first child (FBI clan) as 'clansroot', then looping through its children (which don't exist, therefore nothing is removed). You're supposed to loop through the children of 'clans' instead. In addition, you're saving and unloading the XML file inside the loop - that's wrong. You should do this after the loop. If you unload the file inside the loop, it won't be available for the next iteration, causing an error. Saving the file repeatedly will have no effect on the result, but doing so will needlessly reduce the performance.
  21. The root node of XML file is the one which xmlLoadFile returns.
  22. Create the ped server-side?
×
×
  • Create New...