I looked, but the problem is that i don't know how to use it with random...
PHP Code:
new g_Barman[ ][ ] =
{
"msg1"
"msg2"
"msg3"
};
PHP Code:
public Barman_Says()
{
if(get_cvar_num("Say_Time") >= 1)
{
switch(random_num(0,5))
{
case 1:
{
ColorChat(0, RED, "%s", g_Barman);
set_task(float(get_pcvar_num(Say_Time)), "Barman_Says");
}
case 2:
{
ColorChat(0, BLUE, "%s", g_Barman);
set_task(float(get_pcvar_num(Say_Time)), "Barman_Says");
}
case 3:
{
ColorChat(0, GREY, "%s", g_Barman);
set_task(float(get_pcvar_num(Say_Time)), "Barman_Says");
}
case 4:
{
ColorChat(0, NORMAL, "%s", g_Barman);
set_task(float(get_pcvar_num(Say_Time)), "Barman_Says");
}
case 5:
{
ColorChat(0, GREEN, "%s", g_Barman);
set_task(float(get_pcvar_num(Say_Time)), "Barman_Says");
}
}
return
}
}
__________________