Again not working. My all code is
Code:
new players;
new randompl;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("StartRound",2,"1=Round_Start")
randompl = random_num(1,players)
players = get_playersnum();
}
public StartRound()
{
if(players >= 1) {
new cName[32]
get_user_name(randompl, cName, 31)
set_hudmessage(255, 0, 0, -1.0, 0.01)
show_hudmessage(0, "%s is the Choosen One!", cName)
set_task(5.0, "RandomFunc")
}
}
Deagle( const id )
{
new deagle = give_item(id, "weapon_deagle");
cs_set_weapon_ammo(deagle, 1)
client_print(id, print_chat, "You Recieve Deagle")
}
AWP( const id )
{
new awp = give_item(id, "weapon_awp");
cs_set_weapon_ammo(awp, 1)
client_print(id, print_chat, "You Recieve AWP")
}
Health( const id )
{
set_user_health(id, 150)
client_print(id, print_chat, "You Recieve Health")
}
public RandomFunc( )
{
switch( random_num( 1, 3 ) )
{
case 1:
{
Deagle( randompl );
}
case 2:
{
AWP( randompl );
}
case 3:
{
Health( randompl );
}
}
}
Where is my mistake