Hello,
I come to you because at the time I was using amx and there was a small handy menu.
When it was given freely and we target a player or that one was a spectator on a player, you just activate the menu and it offered to kick, ban etc. .. directly.
It was very convenient because we avoided spending much time looking for the player in the original menu.
I searched but I have not found.
I do not know if you see what I mean is, or if you can help me.
Sorry for my english, google translation.
Original plugin for amx
Here's why I ask. I am attempting to use a script for AMX called spectating_admin. Basically you just point at a player and you get all kinds of options (like slap, slay, kick, ban) makes it much easier to admin. Anyway, it works fine in CS. You point and click, and they die. But for some reason in NS, everytime I try it, it tells me that I'm not pointing at a player.
Code:
/* AMX Mod script.
*
* (c) Copyright 2002, OLO
* This file is provided as is (no warranties).
*
*/
/* admin with flag "m" must point someone (during spectating or when playing)
* and use "say specmenu" (the best way is just binding the command)
*/
#include <amxmod>
new aspec[33]
new agot[33]
public status_changed(id)
aspec[id] = read_data(2)
public do_action(id){
if (!(get_user_flags(id)&ADMIN_LEVEL_A)){
client_print(id,print_chat,"[AMX] You have no access to that command")
return PLUGIN_HANDLED
}
if (aspec[id] == 0){
client_print(id,print_chat,"[AMX] You must point at someone")
return PLUGIN_HANDLED
}
if (get_user_flags(aspec[id])&ADMIN_IMMUNITY){
client_print(id,print_chat,"[AMX] The player has immunity")
return PLUGIN_HANDLED
}
agot[id] = aspec[id]
new bmenu[256], name[32]
get_user_name(agot[id],name,32)
format(bmenu,256,"\ySpec Menu: %s^n\w^n1. Kick^n2. Ban on 5 min.^n3. Slay^n4. Slap^n5. Godmode^n6. Noclip^n7. Store My Origin^n8. Teleport^n^n0. Exit",name)
show_menu(id,(1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<9),bmenu)
return PLUGIN_CONTINUE
}
public action_menu(id,key){
if (!is_user_connected(agot[id])){
client_print(id,print_chat,"[AMX] This client has already exit the server")
return PLUGIN_CONTINUE
}
switch(key){
case 0: server_cmd("kick # %d",get_user_userid(agot[id]))
case 1: {
new temp[32]
get_user_authid(agot[id],temp,32)
server_cmd("banid 5.0 %s kick",temp)
}
case 2: user_kill(agot[id])
case 3: user_slap(id,5)
case 4: {
if(get_user_godmode(agot[id]))
set_user_godmode(agot[id],0)
else
set_user_godmode(agot[id],1)
}
case 5: {
if(get_user_noclip(agot[id]))
set_user_noclip(agot[id],0)
else
set_user_noclip(agot[id],1)
}
case 6: {
client_cmd(id,"amx_myorigin")
client_print(0,print_chat,"[AMX] Storing your origin....")
}
case 7: {
new name[32+1]
get_user_name(agot[id],name,32)
client_cmd(id,"amx_teleport %s",name)
}
}
return PLUGIN_CONTINUE
}
public amx_point(id) {
if (!(get_user_flags(id)&ADMIN_LEVEL_A)){
client_print(id,print_chat,"[AMX] You have no access to that command")
return PLUGIN_HANDLED
}
if (aspec[id] == 0){
client_print(id,print_chat,"[AMX] You must point at someone")
return PLUGIN_HANDLED
}
if (get_user_flags(aspec[id])&ADMIN_IMMUNITY){
client_print(id,print_chat,"[AMX] The player has immunity")
return PLUGIN_HANDLED
}
new name[32+1]
get_user_name(aspec[id],name,32)
new cmd[128]
read_args(cmd,128)
client_cmd(id,cmd,name)
return PLUGIN_HANDLED
}
public plugin_init() {
register_plugin("Spectating Admin","0.61","default")
register_event("StatusValue","status_changed","b","1=2")
register_menucmd(register_menuid("\ySpec Menu: "),1023,"action_menu")
register_clcmd("say specmenu","do_action",ADMIN_LEVEL_A,"say specmenu")
register_clcmd("amx_point","amx_point",ADMIN_LEVEL_A,"amx_point < %s > < command >")
return PLUGIN_CONTINUE
}
__________________