guten Abend.
ich habe mal versucht ein Script zu erstellen, allerdings läuft es nicht so wie ich es will.
local x,y,z = getElementPosition(source)positionx = xpositiony = ypositionz = z function acars(player) if vioGetElementData ( player, "adminlvl" ) >= 2 then local acar4 = createVehicle(210, x, y, z) else outputChatBox("du bist nicht befugt",player, 125, 125, 0) endendaddCommandHandler("acar", acars)
bitte nicht lachen wenns totaler Müll ist
ist halt mein erster Versuch etwas zu scripten.
Errors: [2013-06-21 12:44:30] acars.lua:1: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil]
und
irgendwas mit createvehicle,(kann das Debugscript leider nicht kopieren)
hoffe auf Hilfe
mfg Harrikan
//edit komischerweise will der Lua code nicht so wie ich es will, deshalb ist es in einer Reihe
local x,y,z = getElementPosition(player)
positionx = x
positiony = y
positionz = z
function acars(player)
if vioGetElementData ( player, "adminlvl" ) >= 2 then
local acar4 = createVehicle(210, x, y, z)
else
outputChatBox("du bist nicht befugt",player, 125, 125, 0)
end
end
addCommandHandler("acar", acars)