Thread: [Help] 3 Things
View Single Post
mcpan313
Senior Member
Join Date: Mar 2010
Old 04-28-2012 , 00:18   Re: [Help] 3 Things
Reply With Quote #6

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.
        
}
    }

__________________
sorry, for my poor english.

Last edited by mcpan313; 04-28-2012 at 00:20.
mcpan313 is offline
Send a message via MSN to mcpan313