Okay, I got a little menu where you can choose the slay player, everything works fine except to the slaying where nothing happens. Its exactly the same with ban too. I will give you my execute handle in the menu.
Slay handle:
Code:
public HandleSlay(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], name[64]
new access, callback
menu_item_getinfo (menu, item, access, data, 5, name, 63, callback)
new szSlayHim = str_to_num ( data )
new szName[33]
get_user_name(id, szName, 32)
get_user_name(szSlayHim, szPlayerName, 32)
get_user_authid(szSlayHim, authid, 31)
ColorChat(0, GREY, "%s ^4%s^3 has slayed ^4%s^3!", prefix, szName, szPlayerName)
server_cmd("amx_slay %s", szPlayerName)
return PLUGIN_CONTINUE
}
Ban handle:
Code:
public HandleBan(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], name[64]
new access, callback
menu_item_getinfo (menu, item, access, data, 5, name, 63, callback)
new szBanHim = str_to_num ( data )
new szName[33]
get_user_name(id, szName, 32)
get_user_name(szBanHim, szPlayerName, 32)
get_user_authid(szBanHim, authid, 31)
ColorChat(0, GREY, "%s ^4%s^3 has banned ^4%s^3! ^4(30 min)^3", prefix, szName, szPlayerName)
server_cmd("amx_ban ^"30^" ^"%s^" ^"Breaking a rule^"", authid)
return PLUGIN_CONTINUE
}