Could you at least try and explain what you're trying to achieve? This way people don't have to read the code in order to understand what you actually want. There might be someone who could just create this for you as it doesn't seem that big of a job.
Besides that, bigdaddy424 provided you with a code that's only compatible with AMXX 1.10 (fmt()).
https://forums.alliedmods.net/showthread.php?t=323270
Retrieving players using get_maxplayers() should be avoided, use get_players() instead.
__________________