Jump to content

[DUVIDA] Problema em definir um elemento.


Recommended Posts

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 by GM_Goulart
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...