Raised This Month: $ Target: $400
 0% 

Detect Reloading Weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mlk27
Veteran Member
Join Date: May 2008
Old 01-29-2009 , 12:53   Re: Detect Reloading Weapons
Reply With Quote #5

Quote:
Originally Posted by arkshine View Post
You may want to try Ham using Ham_Weapon_Reload, if I understand what you want.
yea..that's it but there's one problem..when weapon clips are full and players press reload button, the sound is played anyway although weapons aren not reloaded..how do i make it plays the sound only if weapons are reloaded?

Code:
#include <amxmodx> #include <hamsandwich> const MaxSounds = 3 new SoundList[MaxSounds][] = {     // bla bla... } new g_Weapons[ ][ ] = {   "weapon_p228", "weapon_scout", "weapon_xm1014", "weapon_mac10", "weapon_aug", "weapon_elite", "weapon_fiveseven", "weapon_ump45",     "weapon_sg550", "weapon_galil", "weapon_famas", "weapon_usp", "weapon_glock18", "weapon_awp","weapon_mp5navy", "weapon_m249",     "weapon_m3", "weapon_m4a1", "weapon_tmp", "weapon_g3sg1", "weapon_deagle", "weapon_sg552", "weapon_ak47", "weapon_p90" } public plugin_init() {     // register_plugin bla bla...     for(new i = 0 ; i< sizeof g_Weapons; i++)         RegisterHam(Ham_Weapon_Reload, g_Weapons[i], "Ham_Weapon_Reload_Post") } public plugin_precache() {     // bla bla... } public Ham_Weapon_Reload_Post(id) {     new i = random_num(0, MaxSounds - 1)     client_cmd(0, "spk %s", SoundList[i]) }
Mlk27 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode