Jump to content

[AJUDA!!!] Verificar Arma


Recommended Posts

Ola alguém pode me ajudar com uma duvida estou tentando fazer com que outro player consiga verificar se o player possui alguma arma so que funciona se o player estiver com a arma na mão alguem pode me ajudar com isto?

 

 

function revistar_arma ( thePlayer, _, nick )

			local verificar_arma = getPedWeapon (thePlayer)
  
  if ( verificar_arma )then
  
		outputChatBox ( "Jogador possui arma de fogo" )
		else
		outputChatBox ( "Jogador nao possui arma de fogo." )
		
				end
			end
		end
	end
end
addCommandHandler("revarm", revistar_arma) 

 

Link to comment
7 hours ago, DNL291 said:

if getPedWeapon (thePlayer) and getPedWeapon (thePlayer) ~= 0 then
	outputChatBox("Tem arma!")
else
  	outputChatBox("Não tem arma")
end

Tente usar essa verificação.

ainda esta do mesmo jeito a resposta so é sim se a arma estive na mão.

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