Hallo
ich habe dieses Problem ich habe ein Script gemacht womit man Objekte spawnen kann aber ich bin der Meinung es ist Alles richtig aber es Passiert einfach NICHTS
Kein error kein warning NICHTS
Hier der Code Bitte helft mir Ich weiß nicht was daran Falsch sein Könnte :
Lua
function buildObj ( lp ,typ )
if typ == ramp or typ == box or typ == oil or typ == hzaun or typ == hzaun1 or typ == bin or typ == zaun or typ == bar or typ == rbar or typ == grill then
px, py, pz = getElementPosition(lp)
setPedAnimation( lp, "BOMBER", "BOM_Plant_Loop", 5000, true, false, false, true )
if typ == box then
dyn = createObject(2912, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == oil then
dyn = createObject(2062, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == hzaun then
dyn = createObject(1412, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == bin then
dyn = createObject(1442, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == hzaun1 then
dyn = createObject(1413, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == zaun then
dyn = createObject(1410, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == bar then
dyn = createObject(1424, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == rbar then
dyn = createObject(1459, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == grill then
dyn = createObject(1481, px+2, py, pz)
setElementData(dyn, "pyxs", true)
elseif typ == ramp then
setElementData(dyn, "pyxs", true)
groundZ = getGroundPosition ( px+2, py, pz+50 )
fallschirm = createObject ( 2903, px+2, py, pz+50 )
dyn = createObject(1503, px+2, py, pz+50 )
attachElements(dyn, fallschirm)
setTimer(destroyElement(fallschirm), 5200, 1)
moveObject ( fallschirm, 5000, px+2, py, groundZ )
else
outputChatBox("Please usw ´/build box, oil, hzaun, bin, hzaun1, zaun, bar, rbar, grill, ranmp´", player, 255,0,0)
end
end
end
addCommandHandler("build", buildObj)
Alles anzeigen