Raised This Month: $ Target: $400
 0% 

public turn off/on commands


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 09-29-2009 , 10:34   public turn off/on commands
Reply With Quote #1

how can i put a cvar to this plugin for off/on with /turnon /turnoff commands. And how to add multiple sound becouse something is wrong only plays 1 sound.

PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "Round Start/End"
#define AUTHOR "DoviuX"
#define VERSION "1.3"
 
new const STARTSOUND[]=

 
"RoundStart/Start/Start1.wav",
 
"RoundStart/Start/Start2.wav",
 
"RoundStart/Start/Start3.wav"
}
new const 
ENDSOUND[]= 

 
"RoundStart/End/End1.wav",
 
"RoundStart/End/End2.wav",
 
"RoundStart/End/End3.wav"
}
/*================================================================================
 [Plugin Start]
=================================================================================*/
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_logevent("logevent_round_start"2"1=Round_Start")
 
register_logevent("logevent_round_end"2"1=Round_End")
 
 
register_clcmd("say /turnoff","turnoff")
 
register_clcmd("say_team /turnoff","turnoff")
 
 
register_clcmd("say /turnon","turnon")
 
register_clcmd("say_team /turnon","turnon")
}
public 
plugin_precache() 
{
 
precache_sound(STARTSOUND)
 
precache_sound(ENDSOUND)
}
public 
logevent_round_start(id) {
    
set_task(10.0"1=Round_Start")
    
client_cmd(id"spk %s"STARTSOUND)
    
set_hudmessage(225225225, -1.00.2926.012.0 );
    
show_hudmessage(0"The Ultimate Battle Has Begun !"); 
}
public 
logevent_round_end(id) {
    
set_task(10.0"1=Round_End")
    
client_cmd(id"spk %s"ENDSOUND)
    
set_hudmessage(225225225, -1.00.2926.012.0 );
    
show_hudmessage(0"The Ultimate Battle Has ended !"); 


Last edited by DoviuX; 09-29-2009 at 10:35. Reason: mistake
DoviuX is offline
Send a message via Skype™ to DoviuX
 



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 22:37.


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