Raised This Month: $ Target: $400
 0% 

ThunderClap


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 11-27-2010 , 10:40   Re: ThunderClap
Reply With Quote #6

Quote:
Originally Posted by rrduna View Post
thanks!

how do I add a cvar to set the run time of sound?
PHP Code:
#include <amxmodx>

new pcvar_thundertime1
new pcvar_thungertime2
new const sound_thunder[] = "the_thunder_clap_sound.wav"

public plugin_init()
{
    
register_plugin("What""0.0000.0.1""No oNe :P")
    
set_taskrandom_float30.0,  60.0 ), "Thunderclap")
    
pcvar_thundertime1 register_cvar("amx_thundertime1""30.0")
    
pcvar_thundertime2 register_cvar("amx_thundertime2""60.0")
}

public 
plugin_precache()
{
    
precache_soundsound_thunder )
}

public 
Thunderclap() client_cmd(0"spk ^"%s^""sound_thunder)
{
    
set_taskrandom_floatget_pcvar_num(pcvar_thundertime1), get_pcvar_num(pcvar_thundertime2), "Thunderclap")


EDIT: Fixed a mistake in code that i just noticed
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME

Last edited by r4ndomz; 11-27-2010 at 18:28. Reason: fix
r4ndomz is offline
Send a message via Skype™ to r4ndomz
 



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 11:18.


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