Thread: [Help] 3 Things
View Single Post
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 04-28-2012 , 06:09   Re: [Help] 3 Things
Reply With Quote #7

Quote:
Originally Posted by mcpan313 View Post
PHP Code:
#include <sourcemod>

public OnPluginStart()
{
    
RegConsoleCmd("sm_ct"Command_Test);
    
    
CreateTimer(60.0Timer_FindAdminDoSth_TIMER_REPEAT);
}

public 
Action:Command_Test(clientargs)
{
    if (
args != 1)
    {
        
ReplyToCommand(client"Usage: !sm_ct [argument]");
        return 
Plugin_Handled;
    }
    
    
decl String:buffer[2];
    
GetCmdArg(1buffersizeof(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 
1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i) && (GetUserFlagBits(i) & ADMFLAG_GENERIC))
        {
            
// stuff.
        
}
    }

Thank you, please close the thread .
__________________
retired
shavit is offline