Thread: [Solved] Get players who used command
View Single Post
Qes
AlliedModders Donor
Join Date: Jul 2014
Old 11-14-2017 , 14:54   Re: Get players who used command
Reply With Quote #4

#EDIT
1. The point is, here is how to save all the players who used command it and then sort them in order from the fastest.
a) How can I get the nickname of the first player?
b) How can I remove the first person from this set so that the first person then is the other person who wrote this command?
It's about something like a queue

for example:
Code:
public Action:ShowVIPsList(id, args)
{
	if(!IsValidClient(id))
		return;
	
	PrintToChat(id, " \x03VIPs ONLINE");
	
	new x = 0;
	
	for(new i=1; i<=MaxClients; i++)
	{
		if(IsClientInGame(i) && bVIP[i])
		{
			PrintToChat(id, "%N", i);
			x++;
		}
	}
	
	if(!x)
		PrintToChat(id, "*Nothing*");
}
This code check players who have VIP and print to chat their nickname

Last edited by Qes; 11-14-2017 at 15:06.
Qes is offline