Evil-Cod3r Posted February 15, 2012 Share Posted February 15, 2012 Hi alll i have made this but i want if Player fire with gun the gun automatic reload like my ammo is 10 i fired its give me 10 faster function Bug (source) local slot = getPedWeaponSlot ( source ) if (slot == 2) then setPedWeaponSlot ( source, 1000) setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) end end addEventHandler( "onClientResourceStart", getRootElement( ), Bug) Link to comment
Evil-Cod3r Posted February 15, 2012 Author Share Posted February 15, 2012 Thx Kenix work fine Link to comment
Scooby Posted February 15, 2012 Share Posted February 15, 2012 (edited) personally i wouldnt trigger on every shot... that wouldnt be good... i would check the ammoInClip client side after shooting each bullet, once ammoInClip == 0 then trigger to give the player the loaded gun again imagine 50 players with a smg... all shooting... that would be some serious trigger activity your way Edit: Thx Kenix work fine where did the post go Edited February 15, 2012 by Guest Link to comment
Evil-Cod3r Posted February 15, 2012 Author Share Posted February 15, 2012 addEventHandler( 'onClientPlayerWeaponFire',root, function( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) triggerServerEvent( 'onPlayerWeaponFire',source,weapon,ammo+5 ) end ) addEvent( 'onPlayerWeaponFire',true ) addEventHandler( 'onPlayerWeaponFire',root, function( weapon,ammo ) giveWeapon( source,weapon,ammo ) end ) function dev () setGlitchEnabled ( "quickreload", true ) setGlitchEnabled ( "fastmove", true ) setGlitchEnabled ( "fastfire", true ) setGlitchEnabled ( "crouchbug", true ) setTimer ( dev, 50, 1) end addEventHandler( 'onResourceStart',root, dev) its give me ammo but its shoot to slow how to Make shot faster C-bug ? Link to comment
Kenix Posted February 15, 2012 Share Posted February 15, 2012 Tested. Client addEventHandler( 'onClientPlayerWeaponFire',root, function( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if source == localPlayer then triggerServerEvent( 'onPlayerWeaponFire',source,weapon,getPedAmmoInClip( source )+1,getPedTotalAmmo( source )+1 ) end end ) Server addEvent( 'onPlayerWeaponFire',true ) addEventHandler( 'onPlayerWeaponFire',root, function( weapon,ammo,full ) setWeaponAmmo ( source, weapon, full,ammo ) end ) Link to comment
Evil-Cod3r Posted February 15, 2012 Author Share Posted February 15, 2012 its not fast its shoot 2 in 1 time i need if i shot with sniper shoot dont stop like M-4 Link to comment
Evil-Cod3r Posted February 16, 2012 Author Share Posted February 16, 2012 some one please . Link to comment
JR10 Posted February 16, 2012 Share Posted February 16, 2012 Try: setWeaponProperty(34,"poor","flags",0x000400) setWeaponProperty(34,"std","flags",0x000400) setWeaponProperty(34,"pro","flags",0x000400) Link to comment
Evil-Cod3r Posted February 16, 2012 Author Share Posted February 16, 2012 No Thanks that not what i mean ok i use what Kenix write thanks all 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