Wie könnte ich das bewerkstelligen?
Ich habe das mal aus reiner Testerlaune mal probiert:
Lua
addEventHandler("onVehicleDamage", root, function(loss)
if(getVehicleOccupant(source)) then
local rotX, rotY, rotZ = getElementRotation(source)
if rotY >= 160 and rotY <= 200 then
setElementHealth(source, getElementHealth(source)+loss)
outputChatBox(loss)
end
end
end)
anderer Versuch