Hello, I am trying to pick 1 single client/player to be chosen and get his name and print to the server like "%s name has been chosen!"
PHP Code:
public plugin_init( )
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event( "HLTV", "NewRound", "a", "1=0", "2=0" )
g_Maxplayer = get_maxplayers( )
}
public NewRound( )
{
new example[32]
new id = random_num( 1, sizeof(example) )
for( new id = 1; id <= g_Maxplayer; id++ )
{
get_user_name( id, example, charsmax(example) )
client_print( 0, print_chat, "%s has been chosen!", example )
}
}
It's just that I get warning it said I never used the 'id' index inside the loop... Any improvement?
EDIT : I think I should remove the loop?