Code:
/*
* Name: Knife Glow
* Date: Feb. 21, 2005
*
* Description: This will make the person's knife glow diffrent colors
*
*
*
*
* Usage:
*
*
* Other notes: Credit goes to v3x for the original code
* Genisis helped alot by shortining/fixing the code
* Then mlm0l0mlmT16 converted it in to knife glow
*
* To do:
* - Nothing
*/
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "Knife Glow"
#define AUTHOR "mlm0l0mlmT16, v3x, genisis"
#define VERSION "1"
// R G B A
new iColorblue[4] = { 000, 000, 255, 255 }
new iColorgreen[4] = { 000, 255, 000, 255 }
new iColorred[4] = { 255, 000, 000, 255 }
new iColorpurple[4] = { 255, 000, 255, 255 }
new iColororange[4] = { 255, 125, 000, 255 }
new iColoryellow[4] = { 255, 255, 000, 255 }
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "check_weapons", "be")
register_cvar("knife_blue", "1")
register_cvar("knife_green", "1")
register_cvar("knife_red", "1")
register_cvar("knife_purple", "1")
register_cvar("knife_orange", "1")
register_cvar("knife_yellow", "1")
}
public blue_knifeglow(id)
{
{
set_rendering( id, kRenderFxGlowShell, iColorblue[0], iColorblue[1], iColorblue[2], kRenderNormal, iColorblue[3] )
}
return PLUGIN_CONTINUE
}
public green_knifeglow(id)
{
{
set_rendering( id, kRenderFxGlowShell, iColorgreen[0], iColorgreen[1], iColorgreen[2], kRenderNormal, iColorgreen[3] )
}
return PLUGIN_CONTINUE
}
public red_knifeglow(id)
{
{
set_rendering( id, kRenderFxGlowShell, iColorred[0], iColorred[1], iColorred[2], kRenderNormal, iColorred[3] )
}
return PLUGIN_CONTINUE
}
public purple_knifeglow(id)
{
{
set_rendering( id, kRenderFxGlowShell, iColorpurple[0], iColorpurple[1], iColorpurple[2], kRenderNormal, iColorpurple[3] )
}
return PLUGIN_CONTINUE
}
public orange_knifeglow(id)
{
{
set_rendering( id, kRenderFxGlowShell, iColororange[0], iColororange[1], iColororange[2], kRenderNormal, iColororange[3] )
}
return PLUGIN_CONTINUE
}
public yellow_knifeglow(id)
{
{
set_rendering( id, kRenderFxGlowShell, iColoryellow[0], iColoryellow[1], iColoryellow[2], kRenderNormal, iColoryellow[3] )
}
return PLUGIN_CONTINUE
}
public check_weapons( id )
{
new clip, ammo
new weapon = get_user_weapon( id, clip, ammo )
if((get_cvar_num("knife_blue") == 1))
if(weapon == CSW_KNIFE)
blue_knifeglow(id)
if((get_cvar_num("knife_green") == 1))
if(weapon == CSW_KNIFE)
green_knifeglow(id)
if((get_cvar_num("knife_red") == 1))
if(weapon == CSW_KNIFE)
red_knifeglow(id)
if((get_cvar_num("knife_purple") == 1))
if(weapon == CSW_KNIFE)
purple_knifeglow(id)
if((get_cvar_num("knife_orange") == 1))
if(weapon == CSW_KNIFE)
orange_knifeglow(id)
if((get_cvar_num("knife_yellow") == 1))
if(weapon == CSW_KNIFE)
yellow_knifeglow(id)
return PLUGIN_CONTINUE
}