Jump to content

Captain Cody

Members
  • Posts

    2,753
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Captain Cody

  1. If you wanna round it to a smaller number math.floor.
  2. Ah fine -- https://wiki.multitheftauto.com/wiki/Shader http://gamedevelopment.tutsplus.com/tut ... -cms-23313 that any better?
  3. You use shaders. You put it yourself 'Shader" Vinyl.
  4. It's not connect lag, its server lag.
  5. 5-10 secounds? Either A , you have it on a timer, or B you're experiencing major lag/delays.
  6. Seams your function is not added clientside.
  7. Keep track of how many parts you buy 'With lua' then have it mulitply that by the cost then subtract that, then multiply the new value by the cost.
  8. How would I set the target of a weapon that player is holding? Attempting to put aiming in first person but cannot figure out how I would.
  9. Usually 'Got this script from a friend' = it's stolen in one way or another.
  10. onPlayerLogin https://wiki.multitheftauto.com/wiki/SetAccountData have it set a value spawn.Money, if that equals false then give money, else don't give the money.
  11. You could have it check if there was any previous money, and if so set that to 0
  12. What are you using the change the vehicles dimension or interior. If possible you can add a function to it that gets the elements attached to the vehicle, and changes their dimension / interiors to.
  13. in the PoliceOfficerLS function replace source playerSource with client You are calling a server side event from a client side even, when triggering a server side event it does not pass the player as source, instead of passes the player as 'client'.
  14. Use replace playersource, and source with client.
  15. How would I move an object in front of its self relative to its rotation? Converting an in game object into working ship With WASD controls. But the issue I have is actually getting the ship to move in front of itsself relative to its rotation, any way of doing this?
  16. change player source to client assuming this is a server side script and being called from a client side. If not, post the section of code that calls this function. You may need to put (PlayerSource) in the brackets for this function if it is being sent over by the calling function.
  17. Well you can make it so each time it changes the function 'up' to true or false, if false it moves it up and sets it true and the other way around
  18. Well what you made just makes it slowly move in one set area He wants marker to move up and down, so I said use timer to make it move up and down.
  19. Use a timer to make it constantly move up and down.
  20. Easiest way -- REDO THE WHOLE ENTIRE SCRIPT -- Other then that I got nothing.
  21. createProjectile is client sided so clientside
  22. function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) -- Only create projectile if we are inside a vehicle if(vehicle)then if getVehicleModelFromName(vehicle) == 601 then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) end end end function swatEnter ( thePlayer, seat ) if getElementModel ( source ) == 'Put swat tank id here' then bindKey("mouse1", "down", shootProjectile) toggleControl ( "vehicle_fire", false ) end end addEventHandler ( "onVehicleEnter", getRootElement(), swatEnter ) function swatExit ( thePlayer, seat ) if getElementModel ( source ) == 'Put swat tank id here' then unbindKey("mouse1", "down", shootProjectile) toggleControl ( "vehicle_fire", true ) end end addEventHandler ( "onVehicleExit", getRootElement(), swatExit )) -- Not tested --
  23. You can unbind the fire button in the swat tank, and use mouse_1 key
×
×
  • Create New...