Jump to content

Patrick

Moderators
  • Posts

    1,140
  • Joined

  • Last visited

  • Days Won

    41

Posts posted by Patrick

  1. 15 minutes ago, Killbean said:

    Thanks for a tip - I had some resource that recalculated distance to all pickups every frame. I deleted it, but it still takes around -12FPS continuous. It is more efficient to call createPickup on server or client? Or for long term performance it does not matter?

    Thanks!

    If everyone has to see, call it on server side.

    Try to find which resource use the most CPU with performancebrowserhttps://wiki.multitheftauto.com/wiki/Resource:Performancebrowser
    - use the following option to see detailed informations: d

  2. Just now, cocowen said:

    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?

    pAttach and bone_attach use different parameters (different bone IDs / offsets), you have to reposition them. It isn't enough to just copy/paste them.

    For weapons mostly you have to use:

    addCommandHandler("testweapon", function(player)
        local object = createObject(356, 0, 0, 0)
        exports.pAttach:attach(object, player, "weapon", 0, 0, 0, 0, 0, 0)
    end)

     

  3. 1 hour ago, cocowen said:

    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

    I can't reproduce it, can you send me a proper example resource?
    ... btw the problem is the ped (element), not the 'object'. Where 'element' defined, and is it on server or client side?

  4. 3 minutes ago, cocowen said:

    most function is shared

    whats the different from using function from client or server , do it same ? or client just work for local player

    On client side functions return true or false, depeding on it was successful or not. (For example: attach returns true if objects attached successfully, and false if not)
    But on server side (almost) always returns true, even if it failed. (because it returns the result of triggerClientEvent)

  5. 33 minutes ago, gyrosos14 said:

    Azon túl jutottam (végre). Most viszont a debugscript a következőt írta ki: WARNING: vg_accounts\server.lua:72: dbExec failed; (1062) Duplicate entry '0' for key 'PRIMARY'

    Olyan sort próbálsz meg insertelni, aminek az elsődleges kulcsa már létezik egy másik sornál. Nem lehet két sorod azonos elsődleges kulcsal.

  6. 2 hours ago, gyrosos14 said:

    Ja igen, az if (#bans > 0) then -nél true-ra van állítva, de nem jó

     

    Akkor meg rossz a query, mindig ad vissza sorokat. iprint-el írasd ki a bans táblát és nézd meg mi van benne, vagy phpMyAdmin-ban futtasd le kézzel a SELECT-et.
    Lehetséges, hogy nem jó az expiraton és olyat is visszaad amit nem kéne.

×
×
  • Create New...