Jump to content

[AJUDA!!!] Verificar Arma


Recommended Posts

Posted

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) 

 

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

Posted

Use o segundo argumento da função pra especificar o slot.

Aqui já tem e o outro post com o mesmo assunto:

Responder lá por favor.

Please do not PM me with scripting related question nor support, use the forums instead.

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