Scripting Posted March 23, 2012 Share 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 ) Link to comment
Absence2 Posted March 23, 2012 Share Posted March 23, 2012 (edited) setWeaponProperty ( "sawnoff_shotgun", "pro", "maximum_clip_ammo", 1000 ) Edited March 23, 2012 by Guest Link to comment
Kenix Posted March 23, 2012 Share Posted March 23, 2012 scripter_new, You use in server side? Link to comment
Scripting Posted March 23, 2012 Author Share Posted March 23, 2012 yea in server-side and don t work!! Link to comment
Kenix Posted March 23, 2012 Share Posted March 23, 2012 You use pro skill? It should work. Link to comment
Scripting Posted March 24, 2012 Author Share Posted March 24, 2012 pro skill and don t , you test it don t work, pls fix that pls Link to comment
Kenix Posted March 24, 2012 Share Posted March 24, 2012 I tested. It working . You can in freeroam change weapon stats. Link to comment
Scripting Posted March 24, 2012 Author Share 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 ) Link to comment
drk Posted March 24, 2012 Share 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 ) 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