Lua
function apark_func ( player, command )
if getPedOccupiedVehicleSeat ( player ) == 0 then
local veh = getPedOccupiedVehicle ( player )
if (vioGetElementData ( player, "adminlvl" )) >= 2 then
if isTrailerInParkingZone ( veh ) then
local x, y, z = getElementPosition ( veh )
local rx, ry, rz = getVehicleRotation ( veh )
local c1, c2, c3, c4 = getVehicleColor ( veh )
vioSetElementData ( veh, "spawnposx", x )
vioSetElementData ( veh, "spawnposy", y )
vioSetElementData ( veh, "spawnposz", z )
vioSetElementData ( veh, "spawnrotx", rx )
vioSetElementData ( veh, "spawnroty", ry )
vioSetElementData ( veh, "spawnrotz", rz )
vioSetElementData ( veh, "color1", c1 )
vioSetElementData ( veh, "color2", c2 )
vioSetElementData ( veh, "color3", c3 )
vioSetElementData ( veh, "color4", c4 )
outputChatBox ( "Fahrzeug geparkt!", player, 0, 255, 0 )
local color = "|"..c1.."|"..c2.."|"..c3.."|"..c4.."|"
local Paintjob = getVehiclePaintjob ( veh )
local Benzin = vioGetElementData ( veh, "fuelstate" )
local pname = vioGetElementData ( veh, "owner" )
local Distance = vioGetElementData ( veh, "distance" )
local slot = vioGetElementData ( veh, "carslotnr_owner" )
MySQL_SetString("vehicles", "Spawnpos_X", x, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Spawnpos_Y", y, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Spawnpos_Z", z, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Spawnrot_X", rx, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Spawnrot_Y", ry, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Spawnrot_Z", rz, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Farbe", color, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Paintjob", Paintjob, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Benzin", Benzin, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
MySQL_SetString("vehicles", "Distance", Distance, "Besitzer LIKE '" ..pname.."' AND Slot LIKE '" ..slot.. "' ")
else
outputChatBox ( "Dieses Fahrzeug kannst du nicht in der Stadt parken!", player, 125, 0, 0 )
end
else
outputChatBox ( "Du bist kein Admin!", player, 255, 0, 0 )
end
else
outputChatBox ( "Du musst in einem Fahrzeug sitzen!", player, 255, 0, 0 )
end
end
addCommandHandler("apark", apark_func)
function open_func( player , cmd )
if getElementData(source,"adminlvl") >= 2 then
if getPlayerOccupiedVehicle( source ) then
setVehicleLocked(source,false)
outputChatBox("Fahrzeug geöffnet!",player,0,255,0)
else
outputChatBox("Du bist bei keinem Fahrzeug!",player,255,0,0)
end
else
outputChatBox("Du bist nicht befugt!",player,255,0,0)
end
end
addCommandHandler("open",open_func)
function engine_func( player , cmd )
if getElementData(source,"adminlvl") >= 3 then
if getPlayerOccupiedVehicle(source) then
setVehicleEngineState(source,true)
else
outputChatBox("Du bist in keinem Fahrzeug!",player,255,0,0)
end
else
outputChatBox("Du bist nicht befugt!",player,255,0,0)
end
endaddCommandHandler("engine",engine_func)
Alles anzeigen
alles bis auf /open und /engine wichtiger wäre das /open geht