Raised This Month: $ Target: $400
 0% 

Set glow on a whole team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 05-20-2010 , 13:14   Set glow on a whole team
Reply With Quote #1

How do i set glow on a whole team?
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-20-2010 , 13:21   Re: Set glow on a whole team
Reply With Quote #2

Code:
#include < fun > //Func new Players[32]; new gNum; get_players( Players, gNum); for(new i; i < gNum; i++) {      //get_team Players[i] instead id                  set_user_rendering( Players[i], kRenderFxGlowShell, RRR, GGG, BBB, kRenderNormal, AMOUNT); }

Last edited by #8 SickneSS; 05-20-2010 at 13:37.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 05-20-2010 , 13:33   Re: Set glow on a whole team
Reply With Quote #3

This sets glow on everyone .. I just want to know how to set glow on one team.. I don't need a whole plugin, just that part, im gonna add it to my last request plugin

Last edited by FlyingHorse; 05-22-2010 at 14:35.
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-20-2010 , 13:34   Re: Set glow on a whole team
Reply With Quote #4

yep...
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
NiQu
Veteran Member
Join Date: Nov 2009
Old 05-20-2010 , 14:04   Re: Set glow on a whole team
Reply With Quote #5

I would just check if the player is at a specific team at spawn and then give glow.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-20-2010 , 16:02   Re: Set glow on a whole team
Reply With Quote #6

SickneSS, you forgot to add the team check and alive check.

Quick function to do so:
Code:
SetTeamGlow( CsTeams:Team ) {     new iPlayers[32]     new iNum         get_players( iPlayers, iNum )         new id         for( new i = 0; i < iNum; i++ )     {         id = iPlayers[i]                 if( is_user_alive( id ) && ( cs_get_user_team( id ) == Team ) )         {             set_user_rendering( id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25 )         }     } }
Usage:
Code:
SetTeamGlow( CS_TEAM_CT )
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-20-2010 , 23:35   Re: Set glow on a whole team
Reply With Quote #7

Yes,i forgot,sorry,btw,in your code you sets a same glow color,i modify your code...
Code:
stock cs_set_team_glow(const iTeam,const RRR,const GGG,const BBB,const AMMOUNT) {     new iPlayers[32];     new iNum;     get_players(iPlayers, iNum);         for(new i = 0; i < iNum; i++)     {         new Indx = Players[i];                 if(is_user_alive(Indx) && (cs_get_user_team(Indx) == iTeam)             set_user_rendering( id, kRenderFxGlowShell, RRR, GGG, BBB, kRenderNormal, AMMOUNT );     } }
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-20-2010 , 23:46   Re: Set glow on a whole team
Reply With Quote #8

Code:
SetTeamGlow( CsTeams:Team, r=255, g=0, b=0, amt=25 ) {     new iPlayers[32]     new iNum         get_players( iPlayers, iNum )         new id         for( new i = 0; i < iNum; i++ )     {         id = iPlayers[i]                 if( is_user_alive( id ) && ( cs_get_user_team( id ) == Team ) )         {             set_user_rendering( id, kRenderFxGlowShell, r, g, b, kRenderNormal, amt )         }     } }
Code:
SetTeamGlow( CS_TEAM_T, 100, 200, 50, 17 ) // or SetTeamGlow( CS_TEAM_T )
2nd - 5th parameters are optional. If you do not provide them in the function call then your glow will appear as red.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 05-21-2010 at 00:18.
wrecked_ is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-21-2010 , 00:12   Re: Set glow on a whole team
Reply With Quote #9

Perhaps a good stock would be something like:

Code:
stock set_team_rendering( CsTeams:Team, kRender = kRenderNormal, r=0, g=0, b=0, amt=0 )
This way set_team_rendering(team) will work like set_user_rendering(id).
__________________
fysiks is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 05-21-2010 , 02:11   Re: Set glow on a whole team
Reply With Quote #10

Something like...

Code:
stock set_team_glow(iTeam, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 20) {     new Float:color[3];     color[0] = Float:r;     color[1] = Float:g;     color[2] = Float:b;     new iPlayers[32];     new iNum;     get_players(iPlayers, iNum);         new index;         for(new i = 0;i < iNum; i++)     {         index = Players[i];                 if(is_user_alive(index) && cs_get_user_team(index) == iTeam)         {             set_pev(index,pev_renderfx,kRenderFxGlowShell);             set_pev(index,pev_rendercolor,color);             set_pev(index,pev_rendermode,render);             set_pev(index,pev_renderamt,amount);         }     }     return 1; }
?
Not tested
if u use it,needs #include <cstrike>
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
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 03:54.


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