Try this script: (it will give the Custom1 flag to the first 5 user who connect)
PHP Code:
#include <sourcemod>
new Handle:g_hConVar;
public OnPluginStart()
{
g_hConVar = CreateConVar("sm_benefitplayers", "5", "The first X players who join the server will get the Custom1 Flag");
AutoExecConfig();
}
public OnClientPutInServer(client)
{
new playercount = 0;
new benefitplayers = GetConVarInt(g_hConVar);
for (new i = 1;i <= MaxClients;i++)
{
if (IsClientInGame(i) && IsClientConnected(i) && !IsFakeClient(i))
{
playercount++;
if (playercount > benefitplayers) return;
}
}
AddUserFlags(client, Admin_Custom1);
}
If it works please donate the money here:
http://www.sourcemod.net/donate.php