gerlachmax123
Members-
Posts
45 -
Joined
-
Last visited
Everything posted by gerlachmax123
-
And the gate should move every time, not one time..
-
Server side or Client? Thank you
-
Hello, How i can create a Gate thats moving every time. Without Command.. Thank you
-
Thank you
-
Hello, How i can freeze a vehicle, when the vehicle drives in a marker? After 1 second the vehicle will unfreeze..
-
Where i must change it?
-
hi, How i get the nearest Object? Its the Object Model "17950" (Garage). That here get the nearest vehicle: function getNearestVehicle( player ) local x, y, z = getElementPosition( player ) local prevDistance local nearestVehicle for i, v in ipairs( getElementsByType( "vehicle" ) ) do local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( v ) ) if distance <= ( prevDistance or distance + 1 ) then prevDistance = distance nearestVehicle = v end end return nearestVehicle or false end function doSomethingWithTheNearestVeh( player ) local vehicle = getNearestVehicle( player ) if vehicle then if not getPedOccupiedVehicle( player ) then else outputChatBox ( "blabla!", player, 125, 0, 0 ) end end end addCommandHandler( "blabla", doSomethingWithTheNearestVeh ) But i need the nearest Object.. Model 17950
-
But what is the standart from the m4?
-
How i can set the ak-47 like to m4. The ak-47 should equal to shoot well like the m4. The Ak-47 should be have the same stats ( skills, munition,...) like the m4 How i can do that?
-
when the car is burning, you must go away and the come again to see the blip...
-
oh it works, but when the car is burning, you must go away and the come again. Then is the Blip there This works serverside too?
-
This wont check the vehicle, if the vehicle will be repaired.. addEvent("burnBlip", true) addEventHandler("burnBlip", root, function (car) if getElementType(car) == "vehicle" then local check = getElementHealth(car) if check < 250 then local x,y,z = getElementPosition(source) local blip = createBlip(x,y,z, 43) attachElements(blip, car) else destroyElement(blip) end end end )
-
Why this want work? barricadeFactions = { [10]=true } vehicleBlips = {} addEventHandler( "onClientElementStreamIn", getRootElement(), function() if getElementType( source ) == "vehicle" then if getElementHealth ( source ) < 250 then if barricadeFactions[getElementData ( lp, "fraktion" )] then setTimer( function( v ) vehicleBlips[v] = createBlipAttachedTo( v, 27, 1 ) 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 )
-
No check every 1 second or so?
-
Difficult ^^ Thank you for your help
-
How i can create a Blip on any vehicle if the vehicle is burning = (249)
-
yes No you dont want to say this I think because of you are making a rocket script for race? And when car shots rocket you want it to wait 5 second? I want to start a function after i hold the button 5 seconds
-
No, that already works, but i like to press the button "lctrl" 5 seconds and not 1 second...
-
function bindKeys() if isfeuerwehr ( player ) then bindKey(source, "lctrl", "down", "loeschen") end end addEventHandler("onPlayerJoin", root, bindKeys) How i can change it, that you must press lctrl 5 seconds?
-
lol ^^
-
omg i forgot "then" ^^ thank you
-
fraktionen/feuerwehr/feuerwehr_server.lua:75: ')' expected (to close '(' at line 74) near 'setPedAnimation'
-
So? function getNearestVehicle( player ) local x, y, z = getElementPosition( player ) local prevDistance local nearestVehicle for i, v in ipairs( getElementsByType( "vehicle" ) ) do local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( v ) ) if distance <= ( prevDistance or distance + 1 ) then prevDistance = distance nearestVehicle = v end end return nearestVehicle or false end function doSomethingWithTheNearestVeh( player ) local vehicle = getNearestVehicle( player ) local x1, y1, z1 = getElementPosition ( vehicle ) local x2, y2, z2 = getElementPosition ( player ) if vehicle then if not getPedOccupiedVehicle( player ) then if isfeuerwehr ( player ) then if (getPedWeapon (player) == 42) then if getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) < 5 then if (getElementHealth ( vehicle ) <= 255 setPedAnimation( player, "FLAME", "FLAME_fire" ) setTimer( setPedAnimation, 15000, 1, player ) setElementHealth( vehicle, 255 ) else outputChatBox ( "Dieses Fahrzeug brennt nicht!", player, 125, 0, 0 ) end else outputChatBox ( "Hier ist kein Fahrzeug zum Reparieren!", player, 125, 0, 0 ) end else outputChatBox ( "Du hast keinen Feuerloescher!", player, 125, 0, 0 ) end else outputChatBox ( "Du bist kein Mitglied der Feuerwehr!", player, 125, 0, 0 ) end else outputChatBox ( "Du musst vor der Motorhaube des Fahrzeuges stehen!", player, 125, 0, 0 ) end end end addCommandHandler( "loeschen", doSomethingWithTheNearestVeh )
-
Why this doesnt work? function getNearestVehicle( player ) local x, y, z = getElementPosition( player ) local prevDistance local nearestVehicle for i, v in ipairs( getElementsByType( "vehicle" ) ) do local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( v ) ) if distance <= ( prevDistance or distance + 1 ) then prevDistance = distance nearestVehicle = v end end return nearestVehicle or false end function doSomethingWithTheNearestVeh( player ) local vehicle = getNearestVehicle( player ) if vehicle then if not getPedOccupiedVehicle( player ) then if isfeuerwehr ( player ) then if (getPedWeapon (player) == 42) then if (getElementHealth ( vehicle ) <= 255 setPedAnimation( player, "FLAME", "FLAME_fire" ) setTimer( setPedAnimation, 15000, 1, player ) setElementHealth( vehicle, 255 ) else outputChatBox ( "Dieses Fahrzeug brennt nicht!", player, 125, 0, 0 ) end else outputChatBox ( "Du hast keinen Feuerloescher!", player, 125, 0, 0 ) end else outputChatBox ( "Du bist kein Mitglied der Feuerwehr!", player, 125, 0, 0 ) end else outputChatBox ( "Du musst vor der Motorhaube des Fahrzeuges stehen!", player, 125, 0, 0 ) end end end addCommandHandler( "loeschen", doSomethingWithTheNearestVeh ) And how i can set the distance to 5m ? So I can repair the Vehicle (thats burning) only in 5 m
