Jump to content

mjr

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by mjr

  1. not so much as you think and what do you mean by saying "stolen"? who needs your scripts?
  2. of course, you can create objects on the client-side, but then all will depends on client sync, for example, one player will destroy chair and will be able to walk on the surface where chair stayed. in that case other players will watch as this guy walks through their chairs. offtop:
  3. https://community.multitheftauto.com/ind ... =resources type in name field "scoreboard" and look through some scripts, maybe you'll find what you seek
  4. you have already answered your question.
  5. Thanks topic may be closed
  6. i know how to use search and i read it before, there is NO answer on my question
  7. so comprehensive answer. THANK YOU! can someone else tell me how to get variable?
  8. hi2all. the problem is that i don't know how to use table that is returned by dbPoll when query is success. function loginPlayerDB(localPlayer,name,pass) dbQuery( function(handle) local resultTable = dbPoll(handle,0) end, SQLconnect, "SELECT password FROM players WHERE name='"..name.."' LIMIT 1" ) end here, resultTable must have table with password that i need to use later, but i don't know how to manage this table.
  9. mjr

    Car spawn

    yes. i wrote about setTimer function a few posts earlier. Topic can be closed
  10. mjr

    Car spawn

    of course, you made my scripting experience! probably, i'd never read this on wiki
  11. mjr

    Car spawn

    okay, okay, great programming guru, i'll remember your super smart advice!
  12. mjr

    Car spawn

    to IIYAMA, can you just write where's the problem? why single resource is working, but integrating the code to my main .lua file gives no result? edited: okay, i got it. when main resource starts, vehicles need time to spawn and the "vehicle" element table is just EMPTY, so the fucntions apply to no elements. setting timer solves this problem. function onStart() -- car spawn setTimer (function() for i, v in ipairs (getElementsByType("vehicle")) do toggleVehicleRespawn(v, true) setVehicleRespawnDelay(v, 5000) setVehicleIdleRespawnDelay(v, 5000) end end, 1000,1) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStart)
  13. mjr

    Car spawn

    to Jaysds1, i mean my code function onStart() -- car spawn for i, v in ipairs (getElementsByType("vehicle")) do toggleVehicleRespawn(v, true) setVehicleRespawnDelay(v, 5000) setVehicleIdleRespawnDelay(v, 5000) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStart) doesn't work. Vehicles aren't respawning. ps. onVehicleExplode event triggers only when car is wrecked. i need respawn not only on wreck, but also idle
  14. mjr

    Car spawn

    same troule with me. vehicles are defined in .map file
×
×
  • Create New...