boro Posted November 25, 2012 Share 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) Link to comment
Kenix Posted November 25, 2012 Share Posted November 25, 2012 This function doesn't exists. I don't understand what are you trying to do. Link to comment
myonlake Posted November 25, 2012 Share Posted November 25, 2012 setWeaponFrozen is not a function name Link to comment
1MenuX1 Posted November 25, 2012 Share Posted November 25, 2012 How to set weapon frozen ? Its too set Weapon not shooting ? If is , max. setWeaponAmmo .. Link to comment
boro Posted November 25, 2012 Author Share Posted November 25, 2012 No i want make stop gun shooting but no remove gun only stop shot Link to comment
abu5lf Posted November 25, 2012 Share Posted November 25, 2012 https://wiki.multitheftauto.com/wiki/ToggleControl Link to comment
boro Posted November 25, 2012 Author Share 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 Link to comment
Castillo Posted November 25, 2012 Share Posted November 25, 2012 There is no such event: "onPlayerWeaponUse". Link to comment
50p Posted November 25, 2012 Share Posted November 25, 2012 https://wiki.multitheftauto.com/wiki/OnP ... aponSwitch even the example on the page shows you how to disable weapons. Link to comment
boro Posted November 25, 2012 Author Share Posted November 25, 2012 and now ? function disableFireForWeapon ( theWeapon ) if ( getElementModel ( theWeapon ) == 38 ) then toggleControl ( source, fire, false ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), disableFireForWeapon ) Link to comment
Castillo Posted November 25, 2012 Share Posted November 25, 2012 function disableFireForWeapon ( _, theWeapon ) if ( theWeapon == 38 ) then toggleControl ( source, "fire", false ) end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), disableFireForWeapon ) Link to comment
boro Posted November 26, 2012 Author Share Posted November 26, 2012 "..." type="script" author="..." version="..." description="..." /> Link to comment
TAPL Posted November 26, 2012 Share 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 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