Zakk Posted October 14, 2019 Share Posted October 14, 2019 (edited) Alguem me ajuda eu peguei uma Fabrica de Arma é tentei edita ela mas ta dando um erro na lina 17 é nao sei como resolver, se alguem poder ajuda como eu arrumo agradeço des de ja Edit : Eu sei que nao coloquei a função de da a arma para o jogador vou coloca dps. Erro do Debugscript 3 : Bad argument @ addcommandHandler [Expected boot at argument 3, got marker] local markerfab = createMarker(2068.21582, -1366.30005, 23.8121-1,"cylinder", 1.3, 255,0,0, 50) function fabricarArma( thePlayer,markerfab ) toggleAllControls( thePlayer, false, true, false ) setPedAnimation (thePlayer, "ped", "WOMAN_walknorm") setTimer( function(thePlayer) toggleAllControls( thePlayer, true ) setPedAnimation( thePlayer ) outputChatBox ("[FabricarArmas] Você fabricou AK-47." , thePlayer, 112, 128, 144) end, 30000, 1 ) end addCommandHandler ("fabricar", fabricarArma,markerfab) function fabricarArma2( thePlayer ) outputChatBox ("[FabricarArmas] digite /fabricar para fabricar AK-47." , thePlayer, 112, 128, 144) end addEventHandler("onMarkerHit", markerfab, fabricarArma2) Edited October 14, 2019 by Zakk Link to comment
DNL291 Posted October 14, 2019 Share Posted October 14, 2019 addCommandHandler está errado, tire o 3º argumento e use isElementWithinMarker. No onMarkerHit verifique se o hitElement é o player. Movido para Other languages > Portuguese / Português > Programação em Lua @Zakk Link to comment
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