Scripting Posted March 23, 2012 Posted March 23, 2012 (maximum_clip_ammo) don t work in weapon id:26, pls fix that and thx setWeaponProperty ( 26, "pro", "maximum_clip_ammo", 1000 )
Absence2 Posted March 23, 2012 Posted March 23, 2012 (edited) setWeaponProperty ( "sawnoff_shotgun", "pro", "maximum_clip_ammo", 1000 ) Edited March 23, 2012 by Guest
Scripting Posted March 24, 2012 Author Posted March 24, 2012 pro skill and don t , you test it don t work, pls fix that pls
Kenix Posted March 24, 2012 Posted March 24, 2012 I tested. It working . You can in freeroam change weapon stats.
Scripting Posted March 24, 2012 Author Posted March 24, 2012 is this work??! client-side: addEventHandler ( "onClientPlayerWeaponFire",localPlayer, function (weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if ( weapon == 26) then triggerServerEvent("setit",getLocalPlayer()) end end ) server-side: addEvent("setit",true) addEventHandler("setit",root, function() setWeaponProperty ( "sawnoff_shotgun", "pro", "maximum_clip_ammo", 1000 ) end )
drk Posted March 24, 2012 Posted March 24, 2012 https://wiki.multitheftauto.com/wiki/SetWeaponProperty You need learn all. See function requirements. Anyway I tabulated and organized your code. Client-side: addEventHandler ( 'onClientPlayerWeaponFire', localPlayer, function ( w, a, aIC, x, y, z, elem ) if ( w == 26 ) then triggerServerEvent ( 'setIt', localPlayer ) end end ) Server-side: addEvent ( 'setIt', true ) addEventHandler ( 'setIt', root, function ( ) setWeaponProperty ( 'sawnoff_shotgun', 'pro', 'maximum_clip_ammo', 1000 ) end )
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