Hallo,
habe eine kurze frage wenn ich mit der funktion enew aus der Classlib von sbx320s ein Objekt erstelle kann ich dann durch das Objekt die daten auf dem constructor abfragen (Zeile 25)??
Lua
FactionVehicle = {}
FVehicle = inherit(FraktionVehicle)
function FVehicle:constructor(model,slot,fraktion,x,y,z,rot,farbe,paintjob,fuel)
outputChatBox("construction ausgeführt")
self.Model = model
self.Slot = slot
self.Fraktion = fraktion
self.x = x
self.y = y
self.z = z
self.rot = rot
self.Farbe = farbe
self.Paintjob = paintjob
self.Fuel = fuel
end
local x, y, z = getElementPosition ( getPlayerFromName("Piccolo") )
local theVehicle = createVehicle ( 432, x+ 10 , y, z + 10 )
enew(theVehicle, FVehicle, 432,1,1,x, y, z,100,tocolor(255,255,255),1,100)
outputChatBox("Fraktion:"..tostring(theVehicle.Model)) -----warum geht das nicht ??? bekomme ein nil
Alles anzeigen