noonbr Posted November 17, 2019 Share Posted November 17, 2019 (edited) Boa noite, estou com um problema referente a elemento. CLIENT-SIDE: function venderAK(button) if button == "left" then outputChatBox("O jogador "..getPlayerName(localPlayer).." vendeu uma arma ilegal e está procurado agora.") guiSetEnabled(source, false) triggerServerEvent("dArma", resourceRoot) end end addEventHandler("onClientGUIClick", botao1, venderAK, false) SERVER-SIDE: function droparArma(thePlayer) nivel = getPlayerWantedLevel(thePlayer) nivel = tonumber(nivel + 1) takeWeapon(thePlayer, 30) setPlayerWantedLevel(thePlayer, nivel) end addEvent("dArma", true) addEventHandler("dArma", resourceRoot, droparArma) Erro: https://prnt.sc/py98xo Edited November 17, 2019 by GM_Goulart Link to comment
DNL291 Posted November 17, 2019 Share Posted November 17, 2019 Coloque client no lugar de thePlayer. 1 Link to comment
noonbr Posted November 17, 2019 Author Share Posted November 17, 2019 @DNL291, foi! Vlw mesmo 1 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