Raised This Month: $ Target: $400
 0% 

My first plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SpArTaNN
New Member
Join Date: Jul 2009
Old 07-31-2009 , 09:59   My first plugin
Reply With Quote #1

Hey guys .... This is my first plugin ....... I want to tell me how I can do to disconnect a player with reason ... and the player disconnected to see the reason and admin which disconnected.

Quote:
/*This plugin was made by SpArTaNN !
*With this plugin you can disconnect a specified player !
*Command: amx_disconnect
HF*/

#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("Disconnect Player","1.0","SpArTaNN");
register_concmd("amx_disconnect","disconnect_ cmd",ADMIN_KICK,"- <jucator>");
}
public disconnect_cmd(id,level,cid)
{
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED;
new arg[32];
read_argv(1,arg,31);

new player = cmd_target(id,arg,9);
if(!player) return PLUGIN_HANDLED;
new adminname[32],playername[32];
get_user_name(id,adminname,31);
get_user_name(player,playername,31);

client_cmd(player,"disconnect"); //
client_print(0,print_chat,"Admin %s: l-a deconnect pe %s",adminname,playername);

return PLUGIN_HANDLED;
}
sry for my english
SpArTaNN is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode