|
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
|
04-28-2012
, 06:09
Re: [Help] 3 Things
|
#7
|
Quote:
Originally Posted by mcpan313
PHP Code:
#include <sourcemod>
public OnPluginStart()
{
RegConsoleCmd("sm_ct", Command_Test);
CreateTimer(60.0, Timer_FindAdminDoSth, _, TIMER_REPEAT);
}
public Action:Command_Test(client, args)
{
if (args != 1)
{
ReplyToCommand(client, "Usage: !sm_ct [argument]");
return Plugin_Handled;
}
decl String:buffer[2];
GetCmdArg(1, buffer, sizeof(buffer));
new value = StringToInt(buffer);
switch (value)
{
case 0:
{
// !sm_ct 0
}
case 1:
{
// !sm_ct 1
}
}
return Plugin_Handled;
}
public Action:Timer_FindAdminDoSth(Handle:timer)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && !IsFakeClient(i) && (GetUserFlagBits(i) & ADMFLAG_GENERIC))
{
// stuff.
}
}
}
|
Thank you, please close the thread .
__________________
retired
|
|
|
|