Lua
addEventHandler("createAdminCar", root, function()
local adminc = nil
local typ = false
x, y, z = getElementPosition(source)
rx, ry, rz = getElementRotation(source)
if(typ == false)then
adminc = createVehicle(457, x, y, z, rx, ry, rz, "AdminCar")
warpPedIntoVehicle(source, adminc)
setVehicleDamageProof(adminc, true)
setVehicleHandling(adminc, "maxVelocity", 350.0)
setVehicleHandling(adminc, "engineAcceleration", 30)
typ = true
elseif(typ == true)then
outputChatBox("lol")
destroyElement(adminc)
typ = false
end
end)
Alles anzeigen
Keine Errors/Warings, die Nachricht lol kommt auch nicht.
Das Auto wird erstellt jedoch nicht gelöscht.