Raised This Month: $32 Target: $400
 8% 

Team Glow Plugin - Need your help!!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eXile_da_mod
Member
Join Date: Jul 2005
Old 08-04-2005 , 18:41   Team Glow Plugin - Need your help!!!!
Reply With Quote #1

Hi again!

I know i make much with glow in the last time but this plugin will be really cool. This plugin make glow the Terrorists red and the Counter-Terrorists blue. Its really cool for Funservers . But i have one problem! It dont work. Or it work 50% ^^. When i join the T Team i glow red, when i switch the team to CT i glow red too. If i retry and join CT i glow blue. when i switch team i glow blue too. So it dont change the color when a player switch the Team. Please fix that . Thx!

Code:
#include <amxmodx>
#include <fun>

public plugin_init()
{
    register_plugin("Team Glow","1.0","eXile")
    register_event("ResetHUD", "resetGlow", "b")
}

public resetGlow(id)
{
	new userTeam = get_user_team(id)
	if(userTeam == 1) {
            set_task(5.0,"glow_t",id,_,_,"b")
        }
        
	if(userTeam == 2) {
	    set_task(5.0,"glow_ct",id,_,_,"b")
    }
}

public glow_t(id)
{
    set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,16)
    return PLUGIN_CONTINUE
}

public glow_ct(id)
{
	set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,16)
    return PLUGIN_CONTINUE
}
eXile_da_mod is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-04-2005 , 18:48  
Reply With Quote #2

Code:
#include <amxmodx> #include <fun> public plugin_init() {     register_plugin("Team Glow","1.0","eXile")     register_event("ResetHUD", "resetGlow", "b") } public Player_PreThink(id) {       if(is_user_alive(id))       {             new team = get_user_team(id);             if(team == 1)             {                     set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,16)              }               else if(team == 2)              {                      set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,16)              }        } }
try that
Freecode is offline
VanillA Ice
Senior Member
Join Date: Apr 2005
Old 08-04-2005 , 21:01  
Reply With Quote #3

Code:
register_event("ResetHUD", "resetGlow", "b")

why did you leave that in there when its never used

i would just replace Player_PreThink with resetGlow...i think it would work better...


correct me if i am wrong...
__________________
I can no longer help here......school has started... :/ goodbye everybody :'(
VanillA Ice is offline
Send a message via MSN to VanillA Ice Send a message via Yahoo to VanillA Ice
eXile_da_mod
Member
Join Date: Jul 2005
Old 08-05-2005 , 06:04  
Reply With Quote #4

Thanks for your helping but it dont work .

It dont work with PreThink and it dont work like this:

Code:
#include <amxmodx>
#include <fun>

public plugin_init()
{
    register_plugin("Team Glow","1.0","eXile")
    register_event("ResetHUD", "resetGlow", "b")
}

public resetGlow(id)
{
      if(is_user_alive(id))
      {
            new team = get_user_team(id);
            if(team == 1)
            {
                    set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,16)
             }
              else if(team == 2)
             {
                     set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,16)
             }
       }
}
I dont glow. Not matter wich team .
eXile_da_mod is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 08-05-2005 , 06:28  
Reply With Quote #5

Code:
#include <amxmodx> #include <fun> public plugin_init() {         register_plugin("haha","lmao","lol")     register_logevent("set_glow", 2, "0=World triggered", "1=Round_Start") } public set_glow() {         new CsTeams:team         if(!is_user_alive(id)) {         return PLUGIN_HANDLED     }         if(CsTeams == CS_TEAM_T) {         set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,16)     }     if(CsTeams == CS_TEAM_CT) {         set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,16)     } }

something like this WILL work.

the float has to be CsTeams
__________________
Plugins:
none

n0obie4life is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-05-2005 , 11:47  
Reply With Quote #6

For that you need to include cstrike
so add up at the top
Code:
#include <cstrike>
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 08-06-2005 , 01:20  
Reply With Quote #7

. Nice point.

I forgot.
__________________
Plugins:
none

n0obie4life is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-06-2005 , 01:45  
Reply With Quote #8

and your not getting the teams anywhere in that at all

some where you need a for loop and cs_get_user_team
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
PhoeniK
New Member
Join Date: Aug 2005
Old 08-13-2005 , 20:38  
Reply With Quote #9

Code:
#include <amxmodx> #include <fun> public plugin_init(){     register_plugin("Team Glow", "0.1", "PhoeniK")     register_event("ResetHUD","setTeamGlow","be") } public setTeamGlow(){     new tusers[32], ctusers[32], tnum, ctnum     get_players(tusers,tnum,"ae","TERRORIST")     get_players(ctusers,ctnum,"ae","CT")     for(new i=0;i<tnum;i++){         set_user_rendering(tusers[i],kRenderFxGlowShell,255,0,0,kRenderNormal,16)     }     for(new k=0;k<ctnum;k++){         set_user_rendering(ctusers[k],kRenderFxGlowShell,0,0,255,kRenderNormal,16)     } }
Attached Files
File Type: sma Get Plugin or Get Source (teamglow.sma - 963 views - 537 Bytes)
__________________
Sig.
PhoeniK is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 08-14-2005 , 01:22  
Reply With Quote #10

Quote:
Originally Posted by Suicid3
and your not getting the teams anywhere in that at all

some where you need a for loop and cs_get_user_team
duno. i never put a single thought into that script.

All i know is for get_user_teams it must has "CsTeams:"
__________________
Plugins:
none

n0obie4life 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 00:50.


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