Jump to content

استفسار


Recommended Posts

WeaponID = {
	[31] = true,
	[36] = true,
	[38] = true,
}

--add an event handler for onPlayerWeaponSwitch
addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ),
	function ( previousWeaponID, currentWeaponID )
		if ( WeaponID[currentWeaponID] ) then
			toggleControl ( source, 'fire', false ) --disable the fire button
		else
			toggleControl ( source, 'fire', true ) --enable it
		end
	end
)

 

 
Server
bool cancelEvent ( [ bool cancel = true, string reason = "" ] )   
Link to comment
On ٢٥‏/١١‏/٢٠١٦ at 4:14 PM, DmAr511 said:

WeaponID = {	[31] = true,	[36] = true,	[38] = true,}--add an event handler for onPlayerWeaponSwitchaddEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ),	function ( previousWeaponID, currentWeaponID )		if ( WeaponID[currentWeaponID] ) then			toggleControl ( source, 'fire', false ) --disable the fire button		else			toggleControl ( source, 'fire', true ) --enable it		end	end)

 


 
Server

bool cancelEvent ( [ bool cancel = true, string reason = "" ] )   

اسهلك اخوي كنت عطيته صفحة الويكي عشان يفهم افضل +المفترض توضحله
+هو ما يبي اسلحه معينه

هو يبي جميع الاسلحه

 

Link to comment
WeaponID = {-- ID Weapons https://wiki.multitheftauto.com/wiki/Weapons
	[22] = true,
}

addEventHandler ("onPlayerWeaponSwitch",getRootElement(),
	function (previousWeaponID,currentWeaponID)
		if  WeaponID[currentWeaponID] or   WeaponID[previousWeaponID] then 
			toggleControl(source,"next_weapon",false)
			toggleControl(source,"previous_weapon",false)
			toggleControl(source,"fire",false)
		end
	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...