Raised This Month: $51 Target: $400
 12% 

Module: Half-Life Weapon Mod (v0.8)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-12-2019 , 23:57   Re: Module: Half-Life Weapon Mod (v0.8)
Reply With Quote #35

Another question.

I have this "weapon" that allows you to make a sound on Fwd_Wpn_PrimaryAttack. How can I add a delay?

Code:
public box_speech(const iItem, const iPlayer) {     switch (random_num(0, 5))     {         case 0: emit_sound(iPlayer, CHAN_WEAPON, SOUND_PHIL_1, 1.0, ATTN_NORM, 0, PITCH_NORM);         case 1: emit_sound(iPlayer, CHAN_WEAPON, SOUND_PHIL_2, 1.0, ATTN_NORM, 0, PITCH_NORM);         case 2: emit_sound(iPlayer, CHAN_WEAPON, SOUND_PHIL_3, 1.0, ATTN_NORM, 0, PITCH_NORM);         case 3: emit_sound(iPlayer, CHAN_WEAPON, SOUND_PHIL_4, 1.0, ATTN_NORM, 0, PITCH_NORM);         case 4: emit_sound(iPlayer, CHAN_WEAPON, SOUND_PHIL_5, 1.0, ATTN_NORM, 0, PITCH_NORM);         case 5: emit_sound(iPlayer, CHAN_WEAPON, SOUND_PHIL_6, 1.0, ATTN_NORM, 0, PITCH_NORM);     } }

I know I can do it with task and typical AMXX stuff, but I'm wondering if there's a more elegant method within Weaponmod.
__________________
gabuch2 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 14:10.


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