i have this code
when someone write "say /players" appears a menu with all names of the players connected, so I want remove the name of the player who write "players"
PHP Code:
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /players", "PlayerMenu")
}
public PlayerMenu(id)
{
new wMenu = menu_create("\yPlayers Menu", "Handler")
new Pos[3], Name[32]
for (new i = 1; i <= get_maxplayers(); i++)
{
if (!is_user_connected(i))
continue;
num_to_str(i, Pos, sizeof(Pos)-1)
get_user_name(i, Name, sizeof(Name)-1)
menu_additem(wMenu, Name, Pos)
}
menu_setprop(wMenu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, wMenu, 0)
}
public Handler(id, wMenu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(wMenu)
return PLUGIN_HANDLED
}
new Data[6], Name[64]
new Access, Callback
menu_item_getinfo(wMenu, item, Access, Data, sizeof(Data)-1, Name, sizeof(Name)-1, Callback)
set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "%s is the Pink Pony!", Name)
menu_destroy(wMenu)
return PLUGIN_HANDLED
}
I hope you can help me
__________________