View Single Post
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-25-2013 , 02:11   Re: [ANY] Admin Troll
Reply With Quote #6

Quote:
Originally Posted by DarthNinja View Post
PHP Code:
GetClientName(clientnamesizeof(name));

ServerCommand("sm_ban %s %i Trolled"nameGetConVarInt(BanTime));

ServerCommand("sm_kick %s Trolled"name); 
Show me a server running this plugin and I'll show you a server I can run arbitrary commands on.
More specifically, you'd want to use something like this:

PHP Code:
ServerCommand("sm_ban #%d %d Trolled"GetClientUserId(client), GetConVarInt(BanTime));
ServerCommand("sm_kick #%d Trolled"GetClientUserId(client)); 
Although ServerCommand is evil. For kicking, use KickClient. For banning, use BanClient or SBBanPlayer (if using SourceBans).

Also, what does this plugin do? I wasn't able to discern what it does from reading the original post.
__________________

Last edited by Dr. McKay; 05-25-2013 at 02:11.
Dr. McKay is offline