boro Posted November 25, 2012 Posted November 25, 2012 Hi all i try make script for frozen weapon shot but i don't know how to make it , please help I try this, but not work setWeaponFrozen(source, true)
Kenix Posted November 25, 2012 Posted November 25, 2012 This function doesn't exists. I don't understand what are you trying to do.
1MenuX1 Posted November 25, 2012 Posted November 25, 2012 How to set weapon frozen ? Its too set Weapon not shooting ? If is , max. setWeaponAmmo ..
boro Posted November 25, 2012 Author Posted November 25, 2012 No i want make stop gun shooting but no remove gun only stop shot
abu5lf Posted November 25, 2012 Posted November 25, 2012 https://wiki.multitheftauto.com/wiki/ToggleControl
boro Posted November 25, 2012 Author Posted November 25, 2012 (edited) Is it good ? function disableFireForWeapon ( theWeapon ) if ( getElementModel ( theWeapon ) == 38 ) then toggleControl ( source, fire, false ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), disableFireForWeapon ) Edited November 25, 2012 by Guest
Castillo Posted November 25, 2012 Posted November 25, 2012 There is no such event: "onPlayerWeaponUse".
50p Posted November 25, 2012 Posted November 25, 2012 https://wiki.multitheftauto.com/wiki/OnP ... aponSwitch even the example on the page shows you how to disable weapons.
boro Posted November 25, 2012 Author Posted November 25, 2012 and now ? function disableFireForWeapon ( theWeapon ) if ( getElementModel ( theWeapon ) == 38 ) then toggleControl ( source, fire, false ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), disableFireForWeapon )
Castillo Posted November 25, 2012 Posted November 25, 2012 function disableFireForWeapon ( _, theWeapon ) if ( theWeapon == 38 ) then toggleControl ( source, "fire", false ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), disableFireForWeapon )
boro Posted November 26, 2012 Author Posted November 26, 2012 "..." type="script" author="..." version="..." description="..." />
TAPL Posted November 26, 2012 Posted November 26, 2012 Use the example in wiki (it will disable M4 and Heat-Seeking and Minigun) You can change the weapons id from the table. https://wiki.multitheftauto.com/wiki/OnPlayerWeaponSwitch
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