Jump to content

Sistema de mochila HELP Ajuda Pq deu erro


Recommended Posts

function mochila (thePlayer)
    local x, y, z = getElementPosition (thePlayer)
    local sacomoney = createObject (1550, x, y, z)
    setTimer (function (thePlayer)
        exports.bone_attach:attachElementToBone (sacomoney, thePlayer, 4, -0.3, 0.2, 0, -125, 0, 0)
    end, 1000, 1, thePlayer)
end
addCommandHandler ("Mochila", mochila)
 

Quero que quando da /mochila aparece uma objeto nas costa Pq deu erro?

Link to comment
  • Other Languages Moderators

Esse script é client-side, né?

function mochila (cmd)
    local x, y, z = getElementPosition (localPlayer)
    local sacomoney = createObject (1550, x, y, z)
    setTimer (function ()
        exports.bone_attach:attachElementToBone (sacomoney, localPlayer, 4, -0.3, 0.2, 0, -125, 0, 0)
    end, 1000, 1)
end
addCommandHandler ("Mochila", mochila)

 

Link to comment
  • Other Languages Moderators
On 13/04/2019 at 16:36, Lord Henry said:

function mochila (cmd)
    local x, y, z = getElementPosition (localPlayer)
    local sacomoney = createObject (1550, x, y, z)
    setTimer (function ()
        exports.bone_attach:attachElementToBone (sacomoney, localPlayer, 4, -0.3, 0.2, 0, -125, 0, 0)
    end, 1000, 1)
end
addCommandHandler ("Mochila", mochila)

 

@Tio.Andy faça o script daquela forma ali.

Edited by Lord Henry
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...