Raised This Month: $ Target: $400
 0% 

Team glow for 5 secs...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Extrem-5x
Junior Member
Join Date: May 2006
Old 05-26-2006 , 09:14   Team glow for 5 secs...
Reply With Quote #1

How to make a hole team glow for 5 secs and then take it off, so 20 secs after the glow for 5 secs again?
+ how do you do it with player trail too?

Extrem
Extrem-5x is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-26-2006 , 09:17  
Reply With Quote #2

You can use get_players and then the team parameter to isolate the team, then cycle through each player and use set_user_rendering, and then initialize a set_task that will remove the people's glow.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Extrem-5x
Junior Member
Join Date: May 2006
Old 05-26-2006 , 09:24  
Reply With Quote #3

Can you please show me?
i am new to this coding sry.

Extrem
Extrem-5x is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-26-2006 , 11:56  
Reply With Quote #4

Code:
public glow(id) {     if(CsTeams:cs_get_user_team(id) == CS_TEAM_T)     {         set_user_rendering(id,kRenderFxNone,255,0,0,kRenderTransAdd,25)         set_task(5.0,"stop")     }     return PLUGIN_HANDLED } public stop(id) {     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAdd,25)     set_task(5.0,"glow") }


Something along those lines...but im sure you can figure out how to add what hawk said.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Extrem-5x
Junior Member
Join Date: May 2006
Old 05-26-2006 , 14:26  
Reply With Quote #5

when i use that code, it gives me this error
Code:
Error 017: undefined symbol "CS_TEAM_T"
this is the code:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         } public glow(id) {     if(CsTeams:get_user_team(id) == CS_TEAM_T)     {         set_user_rendering(id,kRenderFxNone,255,0,0,kRenderTransAdd,25)         set_task(5.0,"stop")     }     return PLUGIN_HANDLED } public stop(id) {     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAdd,25)     set_task(5.0,"glow") }
Extrem-5x is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-26-2006 , 14:29  
Reply With Quote #6

You didnt include <cstrike>
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Rolnaaba
Veteran Member
Join Date: May 2006
Old 05-26-2006 , 15:07  
Reply With Quote #7

when using that code will it wait about 5 sec? seems like it would just blink on and off..like on for 1sec then off then on? Or maybe I'm just stupid and if so please correct me
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-26-2006 , 15:10  
Reply With Quote #8

It changes back and forth every 5 seconds...


set glow...5 seconds later...take away glow...5 seconds later...give glow...loopback.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Rolnaaba
Veteran Member
Join Date: May 2006
Old 05-26-2006 , 15:13  
Reply With Quote #9

I just didnt see when you set it to wait 5sec before exec the next set of code
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-26-2006 , 15:38  
Reply With Quote #10

If you post code, please post code that is sensible. (OMG, I swear I'm going to shoot this computer, it keeps formating everything !!)

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN “Team Glow” #define VERSION “1.0” #define AUTHOR “Zenith77” #define TASK_GLOW 1234567489 new bool:glow = true; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);             set_task(5.0, “DoGlow”, TASK_GLOW, “”, 0, “b”); } public DoGlow() {     new maxPlayers = get_maxplayers();     new i;     new CsTeams:team;     for(i = 1; i < maxPlayers; i++) {         if(!is_user_connected(i) || !is_user_alive(i))             continue;         team = cs_get_user_team(id);                                 if(glow) {                                          if(team == CS_TEAM_T)                     set_user_rendering(id,kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25);                                          else if(team == CS_TEAM_CT)                                        set_user_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 25);                                                                           else                                            set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 25);                   }                   glow = !glow; }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 16:32.


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