Code:
/*
Command - amx_newcolorskins <1|0>
1 = on
0 = off
Description - If you On this plugin Terrorist's are red ,ct's are blue
********************************************* ***********************
*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "New name"
#define VERSION "1.0"
#define AUTHOR "New Player"
new newb = 1
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_newcolorskins","cmdnewb" ,1,"- turn color skins on and off ; defalut ON")
new parm[1]
set_task(0.1,"loop",0,parm,1,"b")
}
public cmdnewb(id)
{
set_hudmessage(200, 100, 0, -1.0, 0.25, 0, 1.0, 4.0, 0.1, 0.2, 2)
new arg[2]
read_argv(1,arg,1)
if(equal(arg,"1"))
{
newb = 1
console_print(id,"T's will now glow red and CT's will now glow blue.")
show_hudmessage(0,"T's now glow red and CT's now glow blue...")
}
else if(equal(arg,"0"))
{
newb = 0
new players[32], inum
get_players(players,inum)
for(new a=0;a<inum;++a)
set_user_rendering(players[a],kRenderFxNone,0,0,0,kRenderTransTexture,255)
console_print(id,"T's and CT's will now stop glowing.")
show_hudmessage(0,"T's and CT's will now stop glowing...")
}
else
{
if(newb==1)
console_print(id,"Usage: amx_newcolorskins <1|0> 1 = on 0 = off Currently: ON")
else if(newb==0)
console_print(id,"Usage: amx_newcolorskins <1|0> 1 = on 0 = off Currently: OFF")
}
return PLUGIN_CONTINUE
}
public loop(parm[])
{
if(newb==0)
{
//nothing
}
if(newb==1)
{
new players[32], inum
get_players(players,inum)
for(new a=0;a<inum;++a)
{
if(get_user_team(players[a])==1)
set_user_rendering(players[a],kRenderFxGlowShell,255,0,0,kRenderNormal,40)
else
set_user_rendering(players[a],kRenderFxGlowShell,0,0,255,kRenderNormal,40)
}
}
return PLUGIN_CONTINUE
}