Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/03/22 in all areas

  1. In most cases not. (with an important exception: on clientside setElementData used on an element which is created by serverside)
    1 point
  2. Thank you so much, I though that Client-side also could affect the other's player in some way, appreciate your time
    1 point
  3. Then do the selection 100% clientside, that way you eliminate the connection delay and also not wasting network for other players. In your code I do not see serverside btw.
    1 point
  4. Closing this with your solution marked above
    1 point
  5. Here is a useful function to add a rate limit (to user input): https://wiki.multitheftauto.com/wiki/CheckPassiveTimer
    1 point
  6. Hello, maybe just add a button to confirm the vehicle creation ? you could also add a timer to disable it for a while after its been used. Though dont forget vehicles created client side cant be driven so you will need to trigger the server at some point.
    1 point
  7. You can use a table for this, if you don't have very complex code on the client side, I strongly recommend using a table. example: local playerThings = {} -- storage place for player things function example(thePlayer, cmd) local thingCheck = playerThings[thePlayer] -- if player things are always going to be numbers then there is no need for "tonumber" --local thingCount = tostring(thingCheck) -- actually I think it is not needed because you convert it to string type with concatenation in outputChatBox function if (thingCheck and thingCheck >= 1) then outputChatBox("You have "..thingCheck.." thing(s).", thePlayer, 255,255,255) else outputChatBox("You don't have anything.", thePlayer, 255, 255, 255) end end addCommandHandler("mythings", example)
    1 point
  8. Clientside is located on the player their pc. When the game is not running, you are able to modify your downloaded files. Files which are defined by the server meta.xml are protected and will be validated (+reset if incorrect). But files created by Lua scripts are not. As long as it is not setElementData, it is fine. Building the fuel system fuel-value-management clientside is OK, but not great.
    0 points
×
×
  • Create New...