Jump to content

cocowen

Members
  • Posts

    65
  • Joined

  • Last visited

  • Days Won

    1

cocowen last won the day on April 19 2021

cocowen had the most liked content!

Details

  • Gang
    grove
  • Location
    street
  • Occupation
    ped
  • Interests
    script

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cocowen's Achievements

Snitch

Snitch (10/54)

6

Reputation

  1. thank u , i am working on a complex server too , so i am very carefull about this performance and glad to try this
  2. i notice this use setelementdata , just want to ask if i have so many custom model do this cause so many lag using this lib
  3. 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
  4. yes , i use createPed on server-side to create and manage ped
  5. hey , patrick there is a new question i want to ask , i use pAttach:attach from serverside pAttach:attach(object,targetElement,"weapon", 0, 0, 0, 0, -30, 0) debug the targetElement as ped NH_Attach attachWeapon to:elem:ped[100]00012848 object:elem:object[1939]00012849 but the pAttach get Wrong message as pAttach\client.lua:38: Expected element at argument 2, got userdata00012848 i debug at serverside attach function in exports.lua , find cache[element][1] become userdata cache[element][1]:userdata: 0A9BC968 i am really confused , why it have been changed from ped to userdata
  6. ok ,thats ok now , i will destroy the object , nice work
  7. tested ,seems no error now ! thanks u but need to destroy the object by myself?
  8. do not need detachAll anymore? just detach ?
  9. thanks u weapon bone is work nice , seems there are basic work of this bone
  10. yes , another question i trans from boneattach to pattch ,bind a weapon ak on player's right hand , when player hold the ak , its work nice ,but when its aim , the rotation is wrong , but its works find in boneattach , not sure if there is something need to do in pattach , do pattach fit for weapon? by the way ,i use right-hand , not weapon bone
  11. maybe i already find the problem: i destroy the ped ? so let info in table of pattach missed it ?
  12. ok , i understand ,thanks u local object = createObject(371, 0, 0, 0) setElementDimension(object,1) pAttach:attach(object, element, "backpack", 0, -0.15, 0, 90, 0, 0) WARNING: pAttach\client.lua:265: Bad argument @ 'isElementOnScreen' [Expected element at argument 1] i set object to dim 1 , but it keep output this error
  13. if i set attach from localplayer client , other player will see the attached object ,too?
  14. most function is shared whats the different from using function from client or server , do it same ? or client just work for local player
×
×
  • Create New...