Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- public plugin_init()
- {
- register_plugin("Easy Admin Chat","1.0","Optik")
- register_clcmd( "say /slap","slapthem",ADMIN_KICK," : just spectate in free camera and type the message" )
- register_clcmd( "say /kick","kickthem",ADMIN_KICK," : just spectate in free camera and type the message" )
- register_clcmd( "say /slay","slaythem",ADMIN_KICK," : just spectate in free camera and type the message" )
- register_clcmd( "say /spec","specteam",ADMIN_KICK," : just spectate in free camera and type the message" )
- register_clcmd( "say /name","nickthem",ADMIN_KICK," : just spectate in free camera and type the message" )
- register_clcmd( "say /nick","nickthem",ADMIN_KICK," : just spectate in free camera and type the message" )
- }
- public slapthem(id)
- {
- if (!(get_user_flags(id)&ADMIN_KICK))
- {
- client_print(id,print_chat,"[AMXX] You have no access to that command")
- return PLUGIN_HANDLED
- }
- else
- {
- new name [ 32 ]
- get_user_name( id, name, 31 )
- new point_command[50], tid, body, targetname[32], pointername[32]
- get_user_name(id,pointername,31)
- get_user_aiming(id,tid,body)
- get_user_name(tid,targetname,31)
- read_args(point_command, 49)
- new player=find_player("a",targetname)
- if (player)
- {
- user_slap(tid, 0);
- client_print_color(0,print_chat,"ADMIN ^4%s ^1slapped^4 ^4%s", name, targetname)
- }
- if (!player)
- {
- client_print(id,print_chat,"[AMXX] No target found")
- }
- }
- return PLUGIN_HANDLED
- }
- public kickthem(id)
- {
- if (!(get_user_flags(id)&ADMIN_KICK))
- {
- client_print(id,print_chat,"[AMXX] You have no access to that command")
- return PLUGIN_HANDLED
- }
- else
- {
- new name [ 32 ]
- get_user_name( id, name, 31 )
- new point_command[50], tid, body, targetname[32], pointername[32]
- get_user_name(id,pointername,31)
- get_user_aiming(id,tid,body)
- get_user_name(tid,targetname,31)
- read_args(point_command, 49)
- new player=find_player("a",targetname)
- if (player)
- {
- server_cmd("kick ^"%s^"", targetname)
- client_print_color(0,print_chat,"ADMIN ^4%s ^1kicked^4 ^4%s", name, targetname)
- }
- if (!player)
- {
- client_print(id,print_chat,"[AMXX] No target found")
- }
- }
- return PLUGIN_HANDLED
- }
- public slaythem(id)
- {
- if (!(get_user_flags(id)&ADMIN_KICK))
- {
- client_print(id,print_chat,"[AMXX] You have no access to that command")
- return PLUGIN_HANDLED
- }
- else
- {
- new name [ 32 ]
- get_user_name( id, name, 31 )
- new point_command[50], tid, body, targetname[32], pointername[32]
- get_user_name(id,pointername,31)
- get_user_aiming(id,tid,body)
- get_user_name(tid,targetname,31)
- read_args(point_command, 49)
- new player=find_player("a",targetname)
- if (player)
- {
- user_kill(tid);
- client_print_color(0,print_chat,"ADMIN ^4%s ^1slayed^4 ^4%s", name, targetname)
- }
- if (!player)
- {
- client_print(id,print_chat,"[AMXX] No target found")
- }
- }
- return PLUGIN_HANDLED
- }
- public specteam(id)
- {
- if (!(get_user_flags(id)&ADMIN_KICK))
- {
- client_print(id,print_chat,"[AMXX] You have no access to that command")
- return PLUGIN_HANDLED
- }
- else
- {
- new name [ 32 ]
- get_user_name( id, name, 31 )
- new point_command[50], tid, body, targetname[32], pointername[32]
- get_user_name(id,pointername,31)
- get_user_aiming(id,tid,body)
- get_user_name(tid,targetname,31)
- read_args(point_command, 49)
- new player=find_player("a",targetname)
- if (player)
- {
- cs_set_user_team(tid,CS_TEAM_SPECTATOR);
- user_silentkill(tid);
- client_print_color(0,print_chat,"ADMIN ^4%s ^1transferred^4 ^4%s ^1to spec", name, targetname)
- }
- if (!player)
- {
- client_print(id,print_chat,"[AMXX] No target found")
- }
- }
- return PLUGIN_HANDLED
- }
- public nickthem(id)
- {
- if (!(get_user_flags(id)&ADMIN_KICK))
- {
- client_print(id,print_chat,"[AMXX] You have no access to that command")
- return PLUGIN_HANDLED
- }
- else
- {
- new name [ 32 ]
- get_user_name( id, name, 31 )
- new point_command[50], tid, body, targetname[32], pointername[32]
- get_user_name(id,pointername,31)
- get_user_aiming(id,tid,body)
- get_user_name(tid,targetname,31)
- read_args(point_command, 49)
- new player=find_player("a",targetname)
- if (player)
- {
- client_print_color(0,print_chat,"ADMIN ^4%s ^1changed^4 ^4%s ^1nick", name, targetname)
- server_cmd("amx_nick ^"%s^" ^"Name Not Allowed - Change It^"", targetname)
- }
- if (!player)
- {
- client_print(id,print_chat,"[AMXX] No target found")
- }
- }
- return PLUGIN_HANDLED
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement