|
Senior Member
Join Date: Apr 2010
Location: Under your bed.
|

05-25-2010
, 14:51
team color glow
|
#1
|
Hey.. How do i set team color glow of the one who dropped it? (Red for t and blue for cts) ..
PHP Code:
public menu5(id) { new menu = menu_create("\yChoose victim", "submenu5"); new name[33] get_user_name(id, name, 32) 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_CT) {
continue; } get_user_name(tempid, szName, 31); num_to_str(tempid, szTempid, 9); menu_additem(menu, szName, szTempid, 0); } ColorChat(0, RED, "%s^x04 %s^x01 wants a^x04 Gun Toss^x01.", szPREFIX, name) ColorChat(0, RED, "%s^x04 %s^x01 wants a^x04 Gun Toss^x01.", szPREFIX, name) menu_display(id, menu); return PLUGIN_HANDLED; }
public submenu5(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); strip_user_weapons(tempid); strip_user_weapons(id) set_user_health(tempid, 100); set_user_health(id, 100) give_item( id, "weapon_knife" ); cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 0) cs_set_user_bpammo(id, CSW_DEAGLE, 0) give_item( tempid, "weapon_knife" ); cs_set_weapon_ammo(give_item(tempid, "weapon_deagle"), 0) cs_set_user_bpammo(tempid, CSW_DEAGLE, 0)
new szName[32], szName2[32] get_user_name(id, szName, 31); get_user_name(tempid, szName2, 31); ColorChat(0, RED, "%s^x04 %s^x01 selected^x04 %s^x01.", szPREFIX, szName, szName2);
if( is_user_alive(tempid) ) { set_user_health(tempid, 100); set_task(0.5, "fw_model", id) set_task(0.5, "fw_model", tempid) set_task(0.1, "beacon", id) set_task(0.1, "beacon", tempid) menu_destroy(menu); lr_started = true } return PLUGIN_HANDLED;
}
And heres the glow function that i'd like to work with the menu5 function ..
PHP Code:
public fw_model( ent, Model[] ) { if( !pev_valid( ent) ) { return FMRES_IGNORED } if (equal(Model, "models/w_deagle.mdl")) fm_set_rendering( ent, kRenderFxGlowShell, 255, 0, 0 ) return FMRES_IGNORED } fm_set_rendering( ent, fx = kRenderFxNone, r, g, b, mode=kRenderNormal, amount = 16 ) { static Float:RenderColor[ 3 ] RenderColor[ 0 ] = float( r ) RenderColor[ 1 ] = float( g ) RenderColor[ 2 ] = float( b ) set_pev( ent, pev_renderfx, fx ) set_pev( ent, pev_rendercolor, RenderColor ) set_pev( ent, pev_rendermode, mode ) set_pev( ent, pev_renderamt, float( amount ) ) }
Last edited by FlyingHorse; 05-25-2010 at 14:55.
|
|