Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addCommandHandler("waffentruck",
- function(thePlayer)
- local frak = getPlayerFraktion(thePlayer)
- if(frak == 0) or (frak == 3) then outputChatBox("Du bist nicht authorisiert!", thePlayer, 200, 0, 0, false) return end
- local veh = getPedOccupiedVehicle(thePlayer)
- if not(veh) then outputChatBox("Du musst in deinem Fraktions-Flatbed sein!", thePlayer, 200, 0, 0, false) return end
- if(getElementModel(veh) == 455) and (getElementData(veh, "Besitzer") == fraktionNamen[frak]) then
- if(getElementData(thePlayer, "waffentruck") == true) then outputChatBox("Du machst bereits ein Waffentruck!", thePlayer, 200, 0, 0, false) return end
- if(state == 1) then outputChatBox("Es faehrt bereits ein Waffentruck!", thePlayer, 200, 0, 0, false) return end
- setElementData(thePlayer, "waffentruck", true)
- outputChatBox("Du hast die Waffentruck-Mission gestartet. Fahre zum Checkpoint und Lade die Waffen auf!", thePlayer, 0, 200, 0, false)
- wMarker = createMarker(waffen1, waffen2, waffen3, "cylinder", 5.0, 200, 255, 255, 255, thePlayer)
- wBlip = createBlip(waffen1, waffen2, waffen3, 51, 2, 255, 0, 0, 255, 0, 99999.0, thePlayer)
- state = 1
- addEventHandler("onMarkerHit", wMarker,
- function(hitElement)
- if(getElementType(hitElement) == "player") then return end
- local player = getVehicleOccupand(hitElement)
- if not(player == thePlayer) then return end
- outputChatBox("Bitte Warte nun. Du laedst auf. Entferne dich nicht!", player, 0, 200, 0, false)
- setTimer(
- function()
- destroyElement(wMarker)
- destroyElement(wBlip)
- outputChatBox("Fahre nun wieder zurueck zu deiner Base!", player, 0, 200, 0, false)
- local x1 = gettok(bases[getPlayerFraktion(player)], 1, ",")
- local y1 = gettok(bases[getPlayerFraktion(player)], 2, ",")
- local z1 = gettok(bases[getPlayerFraktion(player)], 3, ",")
- wMarker = createMarker(x1, y1, z1, "corona", 3.0, 255, 255, 255, 255, player)
- wBlip = createBlip(x1, y1, z1, 51, 2, 255, 0, 0, 255, 0, 99999.0, player)
- addEventHandler("onMarkerHit", wMarker,
- function(hitElement2)
- if(getElementType(hitElement2) == "player") then return end
- if not(hitElement2 == thePlayer) then return end
- local player2 = getVehicleOccupand(hitElement2)
- if not(player2 == thePlayer) then return end
- outputChatBox("Waffentruck Erfolgreich!", player2, 0, 200, 0, false)
- destroyElement(wMarker)
- destroyElement(wBlip)
- state = 0
- end)
- end, 30000, 1)
- end)
- else -- Flatbed
- outputChatBox("Du bist nicht in deinem Fraktions-Flatbed!", thePlayer, 200, 0, 0, false)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment