PHP Code:
#include <amxmodx>
#include <colorchat>
#define PLUGIN "Commands Helper"
#define VERSION "1.0"
#define AUTHOR "One"
new ad_time
public plugin_init()
{
register_clcmd("say cm", "CommandHelper")
register_clcmd("say /cm", "CommandHelper")
ad_time = register_cvar("ads_time","60");
set_task(float(get_pcvar_num(ad_time)), "ads");
}
public CommandHelper(id)
{
show_motd(id,"commands.txt", "Commands Helper")
}
public ads()
{
switch(random_num(1,4))
{
case 1: //Red
{
ColorChat(0, RED, "Say /cm to see the validable Commands to you!");
set_task(float(get_pcvar_num(ad_time)), "ads");
}
case 2: //Green
{
ColorChat(0, GREEN, "Say /cm to see the validable Commands to you!");
set_task(float(get_pcvar_num(ad_time)), "ads");
}
case 3: //Blue
{
ColorChat(0, BLUE, "Say /cm to see the validable Commands to you!");
set_task(float(get_pcvar_num(ad_time)), "ads");
}
case 4: //Grey
{
ColorChat(0, GREY, "Say /cm to see the validable Commands to you!");
set_task(float(get_pcvar_num(ad_time)), "ads");
}
}
}
__________________