Just to clarify my ideas I'm posting this.
PHP Code:
print_message(id, msg[])
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
#1
PHP Code:
for(new client=1; client<=g_maxplayers; client++)
{
if(is_user_connected(client))
{
print_message(client, buffer)
}
}
#2
PHP Code:
new players[32], playerCount, player
get_players(players, playerCount)
for(new i=0; i<playerCount; i++)
{
player = players[i]
print_message(player, buffer)
}
In the 1st code snippet it just enumerate through all current players and print a message, 2nd code does the same as I dont specify any flags in
get_players(). If I put some flag like 'c' it will return only those numbers matches with that flag.
Am I correct ?