PHP Code:
public menu_handler_money_menu(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1, 2, 3, 4, 5, 6, 7, 8, 9:
{
g_money[id] = str_to_num(data)
}
}
menu_destroy(menu)
MoneyplayerMenu(id)
return PLUGIN_HANDLED
}
After choosing the player with this:
PHP Code:
cs_set_user_money(targetid, g_money[id])
It gives weird amount of money.