Raised This Month: $51 Target: $400
 12% 

[REQ]Team Glow Forever


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 07-11-2008 , 03:51   [REQ]Team Glow Forever
Reply With Quote #1

can someone make aplugin that makes ct glow blue and terrorist glow red and it lasts forever, meaning even after roundend, respawn etc. also a cvar to turn it on/off and another one to make it so the glow will either b team colored or random.
letgoofmyeggs is offline
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 08-06-2008 , 18:42   Re: [REQ]Team Glow Forever
Reply With Quote #2

BUMPPPPPPP
letgoofmyeggs is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-06-2008 , 19:07   Re: [REQ]Team Glow Forever
Reply With Quote #3

Requires HamSandwich module and Cstrike Addon.

Code:
#include <amxmodx> #include <cstrike> #include <fakemeta> #include <hamsandwich> new const Float:g_glows[CsTeams][3] = {     {100.0, 100.0, 100.0},     {255.0, 0.0, 0.0},     {0.0, 0.0, 255.0},     {100.0, 100.0, 100.0} } public plugin_init() {     register_plugin("Forever Team Glow", "0.1", "Exolent");         RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1); } public FwdPlayerSpawn(plr) {     if( is_user_alive(plr) )     {         set_task(0.5, "TaskSetGlow", plr);     } } public TaskSetGlow(plr) {     set_pev(plr, pev_renderfx, kRenderFxGlowShell);     set_pev(plr, pev_rendercolor, g_glows[cs_get_user_team(plr)]);     set_pev(plr, pev_rendermode, kRenderNormal);     set_pev(plr, pev_renderamt, 16.0); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-07-2008 at 17:09.
Exolent[jNr] is offline
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 08-06-2008 , 22:56   Re: [REQ]Team Glow Forever
Reply With Quote #4

k thanks will test.

EDIT: its not working that well. wen players join a team they are glowing, but upon respawn they are normal. when i revive them manualy they are glowing but i want them to glow forever.

Last edited by letgoofmyeggs; 08-07-2008 at 02:19.
letgoofmyeggs is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 08-07-2008 , 16:55   Re: [REQ]Team Glow Forever
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

public plugin_init() {
register_plugin("AMX REDES""1.1.1""|Yokil SpyWare")
register_event("ResetHUD""restart""b")
register_cvar("amx_redes","0")
return 
PLUGIN_CONTINUE
}

public 
restart(id) {

if(
get_cvar_num("amx_redes") != 1) {
set_user_rendering(idkRenderFxGlowShell000kRenderNormal26)
    return 
PLUGIN_HANDLED
}

new 
CsTeams:userTeam cs_get_user_team(id)
if (
userTeam == CS_TEAM_T) {
set_user_rendering(idkRenderFxGlowShell25500kRenderNormal26)
}
if (
userTeam == CS_TEAM_CT) {
set_user_rendering(idkRenderFxGlowShell00255kRenderNormal26)
}
if (
userTeam == CS_TEAM_SPECTATOR) {
set_user_rendering(idkRenderFxGlowShell02550kRenderNormal26)
}


amx_redes 1 to set glow all players
amx_redes 0 to set normal

Glow enable on start round
padilha007 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-07-2008 , 17:11   Re: [REQ]Team Glow Forever
Reply With Quote #6

@letgoofmyeggs

I fixed my code.


@padilha007

That code is horrible.

You registered the spawn event incorrectly, and you used 3 if() statements, instead of 1 switch() statement.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 08-08-2008 , 04:56   Re: [REQ]Team Glow Forever
Reply With Quote #7

TY works great. haha i guess i needa spread karma around b4 i give u nemore
letgoofmyeggs is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-08-2008 , 05:56   Re: [REQ]Team Glow Forever
Reply With Quote #8

Without using Cstrike and Ham...

Code:
    #include <amxmodx>     #include <fakemeta>     enum  { Terrorist = 1, Ct };         #define OFFSET_TEAM 114     #define fm_get_user_team(%1) ( get_pdata_int ( %1, OFFSET_TEAM ) )     public plugin_init ()     {         register_plugin ( "Forever Team Glow", "1.0.0", "Amxx Community");         register_event (  "ResetHUD", "Event_ResetHud", "b" );     }         public Event_ResetHud ( const id )     {         if ( id && !task_exists ( id ) )         {             set_task ( 0.5, "SetGlow", id );         }     }     public SetGlow( const id )     {         if ( is_user_alive ( id ) )         {             set_pev ( id, pev_renderfx, kRenderFxGlowShell );                         switch ( fm_get_user_team( id ) )             {                 case Terrorist : set_pev ( id, pev_rendercolor, Float:{ 255.0, 0.0 , 0.0   } );                 case Ct        : set_pev ( id, pev_rendercolor, Float:{ 0.0  , 0.0 , 255.0 } );             }                         set_pev ( id, pev_rendermode, kRenderNormal );             set_pev ( id, pev_renderamt, 16.0 );         }     }

Quote:
and another one to make it so the glow will either b team colored or random.
Not sure to understand well..
__________________

Last edited by Arkshine; 08-08-2008 at 17:06.
Arkshine is offline
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 08-08-2008 , 16:18   Re: [REQ]Team Glow Forever
Reply With Quote #9

hmm can somone tell me the advantages and disadvantages of arkshine's and X-olent's plugin. i tested both and they both work but i don no which one i shuld use
letgoofmyeggs is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-08-2008 , 16:28   Re: [REQ]Team Glow Forever
Reply With Quote #10

There are not really "advantages" and "disadvantages". The both plugins are fine. But I would prefer mine ( ) since it uses a bit less memory and does what it should do just with one module. It's up to you. ^^
__________________
Arkshine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode