function creature:create(skin,x,y,z,r)
--outputDebugString("TRY CREATE creature ");
local o = {}
setmetatable(o,self);
self.__index = self;
self.source = createPed(skin,x,y,z,r);
setElementParent(self.source,otherElements) -- bind to parent for data system
return o;
end
here is the create part , and used by this
function human:create(skin,x,y,z,r,holdweapon,walkingstyle
local o = creature:create(skin,x,y,z,r)
self.__index = self;
setmetatable(o,self);
local humanped = o:getElement()
...
Attach:attachWeapon(humanped,modelID
...
end
function creature:getElement()
return self.source;
end
its really really confused because seems only melee weapon have bug
seems differents resource use create ped have error , create ped onResourceStart have bug
i use setTimer to make createped more slowly and its works now ,so confused