Jump to content

Gallardo9944

Members
  • Posts

    442
  • Joined

  • Last visited

Everything posted by Gallardo9944

  1. It has to be dynamic. You can use bounding box instead of colshapes then
  2. setDevelopmentMode and /showcol. You can adjust your collisions then.
  3. Spoilers via TXD? You're drunk, Ryan. Mods can be achieved in 2 ways: 1. Add a spoiler into the model as a component and use vehicle components functions. 2. Replace some useless objects with those spoilers and attach them to vehicle or update position and rotation every frame I use 2nd method cause it allows using the same spoilers model on other vehicle models without any need to readd components into all dffs.
  4. check nodes called "file", take attributes called "src" and check their extension.
  5. As a temporary solution, you can try to create trailers serverside in another dimension and then create identical trailers clientside + update their data depending on the server one (with onClientPreRender for streamed ones, a timer for non-streamed ones)
  6. It will follow the truck with a "lag" because the server thinks nobody syncs the trailer. Try to do something with https://wiki.multitheftauto.com/wiki/SetElementSyncer by setting a player as a syncer when he has the trailer streamed in. (This is just a guess though)
  7. It does not show because your player is in dimension 0, but the vehicle is in dimension 4. They have to be in the same dimension to be visible.
  8. As wiki says: Your query is always false. So your "if id then" will never actually pass.
  9. The syntax seems to be fine. Try using ?? instead of ?, it will not auto-escape the strings. I used to get errors with ?, but ?? went on fine. Use ' ' when necessary if you're using ??
  10. If a value is auto increment, you don't have to insert it. It will set itself automatically.
  11. CREATE TABLE yourtable (id INT PRIMARY KEY AUTO_INCREMENT NOT NULL , <your other columns>) Or change the table you have ALTER TABLE yourtable MODIFY COLUMN id INT AUTO_INCREMENT (2nd example changes a column to be auto increment, but doesn't add it)
  12. Your information will stay after you change it. Server crash won't affect it. So you better save more often to keep the data up to date in case something happens.
  13. SELECT * FROM yourtable ORDER BY id DESC LIMIT 1 Should work if you have id column (i think MySQL automatically defines one, SQLite should do that too, not sure). If you don't have an id, you can add a column with AUTO_INCREMENT type.
  14. I personally write user data to mysql every time i want to change it. No impact on the server what so ever. Main idea of multiplayer - never trust client. And any client can modify element data and/or send fake events. You better create a separate resource with exported functions which you can be called only from the server. Or you can use events and check if there is a "client" variable and cancel it if it exists ("client" variable presence means the event was called from client side)
  15. Never make your permanent data depend on your element data. It's easily hackable. Change your original data and only then change element data, according to what your permanent data says.
  16. Since when is it a problem? If both are running, the results will be the same.
  17. You can simply create the panel clientside without the triggers. onClientResourceStart + resourceRoot will do the trick. In case you need join verification: 1. When a player joins, set him into a table 2. onClientResourceStart + resourceRoot + triggerServerEvent so you can trigger server to tell that the player is ready 3. Check if the player is in table table, triggerClientEvent and remove him from the table.
  18. Neither of your codes will work the way you want them to. Scripting section is not a place where everyone will do everything for you. According to the messages, you don't even understand how those things work. Starting off with https://wiki.multitheftauto.com is necessary.
  19. You can change its handling or limit the velocity
  20. Gallardo9944

    What if

    Doing break in the last loop will stop the last loop (for i=1, 16...). If you want to stop both, you can simply use return - it will end the entire function and of course all the loops. If you want to stop both, but continue the function, you can try something like this: function theLoop() for k, ped in ipairs(getElementsByType("ped")) do local stop = false -- don't stop by default for i=1, 16 do if getElementData(ped, "orderNumber") == i then if getElementHealth(ped) < 20 then outputChatBox("Found a ped with lower than 20 hp") stop = true -- specify we want to end this break end end end if stop then break end -- stop the loop if the inner one stopped end end I'm not sure if there are other methods, cause i'm unable to test that at the moment.
  21. Gallardo9944

    Database

    You require this module: https://wiki.multitheftauto.com/index.ph ... /MTA-MySQL But i'd suggest you to remake the connection to dbConnect and dbQuery stuff, which is native for MTA.
  22. You can try to apply this shader to skidmark's texture: https://community.multitheftauto.com/in ... ls&id=7615
  23. setElementPosition will cause a lot of problems if you don't use spawnPlayer before it at least once. Also, your function has name spawnPlayer so it will override original MTA spawnPlayer function. Code in the first post will cause stack overflow (self-call unlimited times)
  24. That's just a list of names, you will still have to replace the default models.
  25. Not possible at the moment. But you can do something with vehicle variants for sure: https://wiki.multitheftauto.com/wiki/Vehicle_variants
×
×
  • Create New...