Jump to content

Paraquedas não abre


Recommended Posts

Fui mod por mod do servidor ativando e testando, e encontrei o mod que faz o paraquedas parar de funcionar, mas ele não tem nada haver com o paraquedas, é um mod que limita a quantia de Satchel que um jogador pode atacar, ele meche apenas no id da Satchel e do Satchel detonator, mas de alguma forma ele esta fazendo o paraquedas não abrir :/
 

Spoiler

local satchels = 0

addEventHandler("onClientPlayerWeaponFire", localPlayer, 
	function(weapon)
		if weapon == 39 then
			satchels = satchels + 1

			if satchels >= 3 then
				setPedWeaponSlot(localPlayer, 12)
				toggleControl ( "fire", false )
			end
		end
	end
)

addEventHandler("onClientPlayerWeaponSwitch", localPlayer, 
	function(old, current)
		local weapon = getPedWeapon(localPlayer, current)
		if weapon == 39 then
			if satchels >= 3 then
				toggleControl ( "fire", false )
			end
		else
			toggleControl ( "fire", true )
		end
	end
)

function reset ()
	satchels = 0
end

addEventHandler("onClientPlayerWeaponSwitch", localPlayer, 
	function(old, current)
		local weapon = getPedWeapon(localPlayer, current)
		if weapon == 40 then
			bindKey( "fire", "down", reset)
		else
			unbindKey( "fire", "down", reset)
		end
	end
)

 

 

Edited by Maaster
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...