EW1611 Posted August 17, 2019 Posted August 17, 2019 olá, queria colocar a mochila de dinheiro(id: 1550), no player, ja tentei com o bone_attach, não consegui, e tentei com o attachElement mas diz que não posso criar mais elementos. esse é o ultimo script q tentei(o mais simples possivel) function bag(player) bag1 = createElement("object", 1550) attachElements(bag1, player) end addCommandHandler("bag", bag) Obrigado.
DNL291 Posted August 17, 2019 Posted August 17, 2019 Use createObject. Please do not PM me with scripting related question nor support, use the forums instead.
EW1611 Posted August 17, 2019 Author Posted August 17, 2019 fiz assim local x, y, z = getElementPosition(player) function bag(player) bag1 = createObject(1550, x, y, z) attachElements(bag1, player) end addCommandHandler("bag", bag) erros na linha 1(Bad argument @ 'getElementPosition' [expected element at agument 1, got nil]); linha 4 (bad argument @ 'createObject' [Expected vector 3 at argument 2, got boolean]); linha 5 (Bad argument @ 'attachElements' [expected element at argument 1, got boolean]).
Tommy. Posted August 17, 2019 Posted August 17, 2019 Tente isso: function bag(player) local x, y, z = getElementPosition(player) bag1 = createObject(1550, x, y, z) attachElements(bag1, player) end addCommandHandler("bag", bag) EDIT: Não testei! DID I HELP YOU? ________________________________________________________________________ ム MY STEAM ________________________________________________________________________ MY SITE www.tommy.br.com
EW1611 Posted August 17, 2019 Author Posted August 17, 2019 @Tommy. não funcionou, erro na linha 2,3,4
DNL291 Posted August 17, 2019 Posted August 17, 2019 Esse código deve ser server-side. Provavelmente você deixou no lado client. Please do not PM me with scripting related question nor support, use the forums instead.
DNL291 Posted August 17, 2019 Posted August 17, 2019 Então não sei o que é. Testei aqui e funcionou. Please do not PM me with scripting related question nor support, use the forums instead.
EW1611 Posted August 17, 2019 Author Posted August 17, 2019 (edited) Na verdade foi agr, erro bobo no XML, desculpe o incomodo Edited August 17, 2019 by EW1611
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now