Jump to content

maffius97

Members
  • Content Count

    19
  • Joined

  • Last visited

Community Reputation

0 Neutral

About maffius97

  • Rank
    Square

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you GTX, works very good
  2. franMark1 = createMarker(1762.6, -1813.4, 12.6, "cylinder", 5, 255, 0, 0, 35) franMark2 = createMarker(1805, -1748.6, 51.5, "cylinder", 5, 255, 0, 0, 115) function teleport(player) if (source == franMark1) then if is_group(player) or is_admin(player) then setElementPosition(player, 1791, -1780, 53) setElementFrozen(player, true) setTimer(setElementFrozen, 300, 1, player, false) elseif isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) setElementPosition(vehicle, 1791, -1780, 53) setElementFrozen(vehicle, true) setTimer(s
  3. I have spike stripe script below. All vehicles have sphere (vehCol) attached to vehicle. I want to break all tires in the vehicle when vehCol hit blow or blow2 or blow3 or blow4. How can I do it? addCommandHandler("sting", function(player) if (player) then local x,y,z = getElementPosition(player) local xr,yr,zr = getElementRotation(player) px, py, pz = getElementPosition(player) prot = getPedRotation(player) local offsetRot = math.rad(prot+90) local vx = px + 5 * math.cos(offsetRot) local vy = py + 5 * math.sin(offs
  4. Can you help me to move this 2 functions to clientside? addCommandHandler("sting", function(player) if (player) then local x,y,z = getElementPosition(player) local xr,yr,zr = getElementRotation(player) px, py, pz = getElementPosition(player) prot = getPedRotation(player) local offsetRot = math.rad(prot+90) local vx = px + 5 * math.cos(offsetRot) local vy = py + 5 * math.sin(offsetRot) local vx2 = px + 2 * math.cos(offsetRot) local vy2 = py + 2 * math.sin(offsetRot) local vx3 = px + 3 * mat
  5. I have few "addEventHandler" inside function which I can trigger by command. Is it safe or will it cause server overload or something?
  6. My question is the same as subject. Is it possible?
  7. I just solved my problem. Thanks for help.
  8. Yes. I changed time in function setVehiclesFuelPerMinute setTimer from 20000 to 1000 and then I can drive just one second, so here's the problem.
  9. 15-20 seconds function setVehiclesFuelPerMinute () for i,veh in ipairs(getElementsByType("vehicle")) do if getVehicleEngineState(veh) == true then if getElementData(getElementData(veh,"parent"),"fuel") >= 0 then setElementData(getElementData(veh,"parent"),"fuel",getElementData(getElementData(veh,"parent"),"fuel")-getVehicleFuelRemove(getElementModel(veh),getElementData(veh,"parent"))) else setVehicleEngineState ( veh, false ) end end end end setTimer(setVehiclesFuelPerMinute,20000,0)
  10. Works, but now when I leave car and get in again I can still drive for a while
  11. function setEngineStateByPlayer (playersource) local veh = getPedOccupiedVehicle (playersource) if (getPedOccupiedVehicleSeat (playersource) == 0) then setVehicleEngineState (veh, not getVehicleEngineState(veh)) if getElementData(getElementData(veh,"parent"),"fuel") <1 then return end if getVehicleEngineState(veh) == true then triggerClientEvent (playersource, "displayClientInfo", playersource,"Vehicle","Engine started!",22,255,0) else triggerClientEvent (playersource, "displayClientInfo", playersource,"Vehicle","Engine
×
×
  • Create New...