Jump to content

Ajuda pedSlot


Recommended Posts

Eu estou fazendo um sistema de revistar o jogador para a polícia, no entanto, só está a aparecer a arma que o jogador tem na mão, se o jogador tiver armas e não estiver com elas na mão não deteta, diz que está desarmado. Eu entendo porque o comando está assim mesmo, mas como posso fazer para no momento de revistar diga todas as armas do jogador?

Já tentei dessas duas formas, porém ambas só me diz o que o jogador tem na mão e não em todas

Obrigado desde já ❤️ 

local weaponType = getPedWeapon ( jogador_revistado )	

if ( weaponType ) then
	outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa está #ff0000armada#ffffff com um(a) ".. weaponType .."!", thePlayer, 255, 255, 255, true)
else
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa está completamente desarmada!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 0) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa está completamente desarmada!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 1) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffff99faca#ffffff!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 2) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffff00pistola#ffffff!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 3) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffcc00caçadeira#ffffff!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 4) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffcc00SMG#ffffff!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 5) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo um #ff6600Rifle#ffffff!", thePlayer, 255, 255, 255, true)
end
if (pedSlot == 6) then
outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ff0000Sniper#ffffff!", thePlayer, 255, 255, 255, true)
end

 

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