Ahmed Araby Posted November 23, 2016 Share Posted November 23, 2016 شباب انا عايز اعمل اللاعب ميقدرش يحرك بين الاسلحه يعني يبقى بقس بس حتى لو معاه سلاح ازاي Link to comment
iPrestege Posted November 23, 2016 Share Posted November 23, 2016 toggleControl( player thePlayer, string control, bool enabled ) Link to comment
Kara Posted November 24, 2016 Share Posted November 24, 2016 'onPlayerWeaponSwitch' cancelEvent Link to comment
Jw8. Posted November 25, 2016 Share Posted November 25, 2016 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
Master_MTA Posted November 27, 2016 Share Posted November 27, 2016 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
Ahmed Ly Posted November 28, 2016 Share Posted November 28, 2016 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
iPrestege Posted November 28, 2016 Share Posted November 28, 2016 يا اخوان ماله داعي كل هذا وظيفتي اللي عطيته كافيه 1 Link to comment
Master_MTA Posted November 28, 2016 Share Posted November 28, 2016 30 minutes ago, iPrestege said: يا اخوان ماله داعي كل هذا وظيفتي اللي عطيته كافيه يب Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now