PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
new g_iMaxPlayers
public plugin_init()
{
register_plugin("JailBreak Glow Menu", "1.1", "izzle")
register_clcmd( "say /glow","JBGlowMenu");
register_clcmd( "say_team /glow","JBGlowMenu");
}
public event_round_start()
{
for (new id; id <= g_iMaxPlayers; id++)
{
fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 20)
}
}
public JBGlowMenu(id)
{
if (cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id))
{
return PLUGIN_HANDLED;
}
new menu = menu_create("\rJB Glow Menu:", "sub_menu");
new players[32], pnum, tempid;
new szName[32], szTempid[10];
get_players(players, pnum, "a");
for( new i; i<pnum; i++ )
{
tempid = players[i];
if (cs_get_user_team(tempid) != CS_TEAM_T)
{
continue;
}
get_user_name(tempid, szName, 31);
num_to_str(tempid, szTempid, 9);
menu_additem(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public sub_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 tempid = str_to_num(data);
new szName[32], szName2[32];
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
fm_set_rendering(tempid, kRenderFxGlowShell, 255, 140, 0, kRenderNormal, 20)
set_hudmessage(0, 255, 0)
show_hudmessage(0, "[JBGM] %s gave a freeday to %s^n and is now glowing!", szName, szName2);
menu_destroy(menu);
return PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/