Still crashing
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Mapbuild Vote"
#define VERSION "1.0"
#define AUTHOR "Bilal"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("RoundStart", 2, "1=Round_Start")
}
public RoundStart()
{
set_task(1.0, "CheckTimeleft", _,_,_, "b")
}
public CheckTimeleft(id)
{
new test = get_timeleft()
if (test <= 60)
{
CmdMenu(id)
}
return PLUGIN_CONTINUE
}
public CmdMenu(id)
{
new menu = menu_create("\yRate this map:", "Menuhandler")
menu_additem(menu, "Excellent", "1")
menu_additem(menu, "Good", "2")
menu_additem(menu, "Regular", "3")
menu_additem(menu, "Terrible", "4")
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
public Menuhandler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], name[64], acces, callback
menu_item_getinfo(menu, item ,acces, data, charsmax(data), name, charsmax(name), callback)
new key = str_to_num(data)
switch (key)
{
case 1: client_print(id, print_center, "Thank you for your vote!")
case 2: client_print(id, print_center, "Thank you for your vote!")
case 3: client_print(id, print_center, "Thank you for your vote!")
case 4: client_print(id, print_center, "Thank you for your vote!")
}
return PLUGIN_HANDLED
}
Crash message:
MSG_ONE or MSG_ONEUNRELIABLE with no target entity
__________________