AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Team glow for 5 secs... (https://forums.alliedmods.net/showthread.php?t=28948)

Extrem-5x 05-26-2006 09:14

Team glow for 5 secs...
 
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

Hawk552 05-26-2006 09:17

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.

Extrem-5x 05-26-2006 09:24

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

Extrem

SweatyBanana 05-26-2006 11:56

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.

Extrem-5x 05-26-2006 14:26

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") }

SweatyBanana 05-26-2006 14:29

You didnt include <cstrike>

Rolnaaba 05-26-2006 15:07

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

SweatyBanana 05-26-2006 15:10

It changes back and forth every 5 seconds...


set glow...5 seconds later...take away glow...5 seconds later...give glow...loopback.

Rolnaaba 05-26-2006 15:13

I just didnt see when you set it to wait 5sec before exec the next set of code

Zenith77 05-26-2006 15:38

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; }


All times are GMT -4. The time now is 16:32.

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