gerlachmax123
Members-
Posts
45 -
Joined
-
Last visited
Everything posted by gerlachmax123
-
It works: time1 = setTimer( function ( ) for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if getElementHealth(vehicle) < 260 then setVehicleDamageProof( vehicle, true) time2 = setTimer ( blowVehicle, 500000, 1, vehicle ) else if getElementHealth(vehicle) >= 299 then setVehicleDamageProof( vehicle, false) killTimer ( time2 ) end end end end, 1000, 0)
-
If the vehicle have = 259 the vehicle will blow immediately...
-
Vehicle must not explode, only burning In addition there is the resource: https://community.multitheftauto.com/index.php?p=r…details&id=6198 However, because I can change nothing because its .LUAC The vehicle should burning 5 minutes. After the 5 minutes the vehicle should explode....
-
So its working client: barricadeFactions = { [10]=true } vehicleBlips = {} addEventHandler( "onClientElementStreamIn", getRootElement(), function() if getElementType( source ) == "vehicle" then if getElementHealth ( source ) < 255 then if barricadeFactions[getElementData ( lp, "fraktion" )] then setTimer( function( v ) vehicleBlips[v] = createBlipAttachedTo( v, 0, 1, 200, 200, 200, 150, 0 ) end, 100, 1, source ) end end end end ) addEventHandler( "onClientElementStreamOut", getRootElement(), function() if getElementType( source ) == "vehicle" then if vehicleBlips[source] then destroyElement( vehicleBlips[source] ) vehicleBlips[source] = nil end end end ) Thank you
-
No, there is no blip, when a vehicle is burning... I have it serverside: -- Server Side local blips = { } local vehicleBlipRoot = createElement ( "vehicleBlipRoot", "vehicleBlipRoot" ) function checkVehicles ( ) local player = getVehicleOccupant ( source ) local controller = getVehicleController ( source ) if blips [ source ] then return end if player ~= controller then if isfeuerwehr ( player ) then if getElementHealth ( source ) < 255 then blips [ source ] = createBlipAttachedTo ( source, 0, 1, 150, 150, 150, 255, -10, 300 ) setElementParent ( blips [ source ], vehicleBlipRoot ) end end end end addEventHandler ( "onVehicleDamage", root, checkVehicles )
-
I dont know what you mean.. I must create it serverside, or?
-
No, when its burning... local vehicleBlipRoot = createElement("vehicleBlipRoot", "vehicleBlipRoot") local function resourceStart() for _, vehicle in ipairs(getElementsByType("vehicle"), root, true) do if vehicle ~= getPedOccupiedVehicle(localPlayer) then if isismafia ( player ) then if getElementHealth( vehicle ) < 255 then local blip = createBlipAttachedTo(vehicle, 0, 1, 150, 150, 150, 255, -10, 300) setElementParent(blip, vehicleBlipRoot) end end end end end addEventHandler("onClientResourceStart", root, resourceStart) local function streamOut() for _, blip in ipairs(getElementChildren(vehicleBlipRoot)) do if getElementAttachedTo(blip) == source then destroyElement(blip) end end removeEventHandler("onClientElementStreamOut", source, streamOut) removeEventHandler("onClientElementDestroy", source, streamOut) end local function streamIn() if getElementType(source) ~= "vehicle" then return end for _, blip in ipairs(getElementChildren(vehicleBlipRoot)) do if getElementAttachedTo(blip) == source then return end end if ismafia ( player ) then if getElementHealth( vehicle ) < 255 then local blip = createBlipAttachedTo(source, 0, 1, 150, 150, 150, 255, -10, 300) setElementParent(blip, vehicleBlipRoot) addEventHandler("onClientElementStreamOut", source, streamOut) addEventHandler("onClientElementDestroy", source, streamOut) end end end addEventHandler("onClientElementStreamIn", root, streamIn) In this Script, there will be no blip, when its burning,.. why?
-
How i create Blips on the radar, when a car is burning?
-
I need not the same
-
How i can make a Firefighter Mission like this? Pls help...
-
pruefungsrepVehicle local pruefungsrepVehicle = createVehicle ( 507, 1174.229, 1339.781, 10.637, 359.764, 0, 180.851 ) --Elegant
-
function reparierungszieltut(pruefungsrepVehicle) if ( getElementHealth ( getPedOccupiedVehicle ( pruefungsrepVehicle ) ) == 800 ) then -- your code goes here end end setTimer ( reparierungszieltut, 1000, 0 ) This works serverside?
-
Can i change the "source" to "pruefungsrepVehicle" ?
-
I dont know how to do that ..
-
function reparierungszieltut(thePlayer) if ( getElementHealth(pruefungsrepVehicle) == 800 ) then outputChatBox ( "Nice Job!", player, 125, 0, 0 ) destroyElement(pruefungsrepVehicle) setElementPosition ( player, 1172.158, 1350.906, 10.922 ) setElementDimension ( player, 0 ) end end Ok, when the car (pruefungsrepVehicle) set on 800 then outputChatBox ( "Nice Job!", player, 125, 0, 0 ) But it will come not ....
-
I know, but i need getElementHealth serverside
-
function getVehHealt() getElementHealth ( getPedOccupiedVehicle ( pruefungsrepVehicle ) end so? i need it serverside...
-
How I can check the Vehicle Health? I have it serverside online but getElementHealth must be clientside function reparierungszieltut(thePlayer) if ( getElementHealth(pruefungsrepVehicle) == 800 ) then outputChatBox ( "Nice Job!", player, 125, 0, 0 ) destroyElement(pruefungsrepVehicle) setElementPosition ( player, 1172.158, 1350.906, 10.922 ) setElementDimension ( player, 0 ) end end Pleas help me.
