Hallo,
hab gerade nen kleinen befehl gescriptet mit dem ganz simpel ein Fahrzeug erstellt werden soll.
Das Problem ist, das Fahrzeug spawnt, ich höre den Motor, aber es ist unsichtbar und erst nach erneutem reconnect kann ich das Fahrzeug sehen.
Lua
function SupCar ( thePlayer, command )
if(getElementData(thePlayer, "eingeloggt") == 1) then
local alevel = getElementData (thePlayer, "adminlevel")
if(alevel > 0) then
local x,y,z = getElementPosition(thePlayer)
local supcar = createVehicle (471, x+2, y+2, z+2, 0.0, 0.0, 0.0, "PIXELRP")
setVehicleColor(supcar, 237, 106, 0, 237, 106, 0, 237, 106, 0, 237, 106, 0)
local welt = getElementDimension ( thePlayer)
setElementDimension(supcar, welt)
setElementData(supcar, "Besitzer", getPlayerName(thePlayer))
outputChatBox("Du hast ein Supporterfahrzeug gespawnt.", thePlayer, 255, 240, 000)
end
end
end
addCommandHandler("smobil", SupCar)
Alles anzeigen