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

Glow instead of flashlight


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-07-2021 , 18:00   Re: Glow instead of flashlight
Reply With Quote #21

Quote:
Originally Posted by sanimare View Post
It's not showing after i die and respawn.
Omit the a in "ae". The link shows you what the letters mean for future reference.

get_players(players,playercount,"ae", glowteam)

Quote:
"a" - do not include dead clients
Also use MSG_ONE instead of MSG_ONE_UNRELIABLE, if you have to as a last resort. It will work MUCH better but at expense of server stability.
__________________
DJEarthQuake is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-16-2021 , 06:52   Re: Glow instead of flashlight
Reply With Quote #22

Quote:
Originally Posted by DJEarthQuake View Post
Omit the a in "ae". The link shows you what the letters mean for future reference.

get_players(players,playercount,"ae", glowteam)



Also use MSG_ONE instead of MSG_ONE_UNRELIABLE, if you have to as a last resort. It will work MUCH better but at expense of server stability.
Yet, the same, i die, change team, and i can't use F, no glow, no sprite.

PHP Code:
/*
 * glow_flashlight.sma Toggle Flashlight and you glow depending on team.
 * 
 * Copyright 2020 SPiNX
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 * 
 * 2020-12-02  1.0 to 1.1 SPiNX
 * Updated so opposing team cannot see.
 * 
*/

#include amxmodx
#include engine
#include fakemeta
#include colorchat

#define MAX_IP_LENGTH     16
#define MAX_NAME_LENGTH   32
#define MAX_PLAYERS       32
#define MAX_AUTHID_LENGTH 64
//#define DEBUG

new bool:cool_down_active
new glowteam[MAX_IP_LENGTH], g_radiusg_timeoverhead_icon_ct,overhead_icon_t;
new 
playersMAX_PLAYERS ], team_nameMAX_NAME_LENGTH ], signalers_nameMAX_NAME_LENGTH ], playercount;
new 
Origin[3];


public 
plugin_init()

{
    
register_plugin("Team Glow flashlight""1.1""SPiNX");
    
register_impulse(100"client_impulse_flashlight");
    
g_radius register_cvar("glow_radius""10")
    
g_time register_cvar("glow_time""10")
    
register_logevent("round_start"2"1=Round_Start");
    
register_logevent("round_end"2"1=Round_End");
}

public 
client_impulse_flashlight(iPlayers_index)

    
glowinsteadofflashlight(iPlayers_index);


public 
round_start()

    
cool_down_active false


public round_end()

    
cool_down_active true


public plugin_precache()

{
    
overhead_icon_ct precache_model("sprites/ct_pass.spr");
    
overhead_icon_t precache_model("sprites/t_pass.spr");
}

public 
glowinsteadofflashlight(iPlayers_index)

{
    
get_user_team(iPlayers_indexglowteamcharsmax(glowteam));

    if(
is_user_connected(iPlayers_index) && !cool_down_active)

        {
            
get_user_origin(iPlayers_indexOrigin);
            
get_players(players,playercount,"e"glowteam)

            for (new 
m=0playercount; ++m)

            {

            
#if defined DEBUG
            
server_print("Team is %s"glowteam);
            
#endif

            
get_user_name(players[m], team_namecharsmax(team_name) );

            if(!
is_user_bot(players[m]))
                
get_user_name(iPlayers_indexsignalers_namecharsmax(signalers_name) );

            
#if defined DEBUG
            
client_print(iPlayers_indexprint_chat"Trying to send glow to %s",team_name);
            
#endif

            
ColorChat(players[m], GREEN"^3Asking ^1for pass ^4%s",signalers_name);

            
emessage_beginMSG_ONE SVC_TEMPENTITY, { 00}, players[m] );
            
ewrite_byte(TE_PLAYERATTACHMENT)
            
ewrite_byte(iPlayers_index)
            
ewrite_coord(MAX_AUTHID_LENGTH//(attachment origin.z = player origin.z + vertical offset)
            
if(equal(glowteam"CT"))
                
ewrite_short(overhead_icon_ct)
            else
                
ewrite_short(overhead_icon_t)
            
ewrite_short(MAX_IP_LENGTH//life * 10
            
emessage_end();

            
emessage_begin(MSG_ONE SVC_TEMPENTITY,{0,0,0},players[m]);
            
ewrite_byte(TE_DLIGHT);

            
ewrite_coord(Origin[0]);
            
ewrite_coord(Origin[1]);
            
ewrite_coord(Origin[2]);

            
ewrite_byte(get_pcvar_num(g_radius)); ///(radius in 10's)

            //CS team RGB messaging
            
if(equal(glowteam"CT"))
                {
                    if (
entity_get_float(iPlayers_indexEV_FL_armorvalue) < 101.0)
                        {
                            
ewrite_byte(0);
                            
ewrite_byte(0);
                            
ewrite_byte(255);
                        }

                        else 
/* VIP */
                            
{
                                
ewrite_byte(0);
                                
ewrite_byte(255);
                                
ewrite_byte(0);
                            }

                }

            if(
equal(glowteam"TERRORIST"))

                {
                    
ewrite_byte(255);
                    
ewrite_byte(0);
                    
ewrite_byte(0);
                }

            
ewrite_byte(get_pcvar_num(g_time));  ///life
            
ewrite_byte(get_pcvar_num(g_time));  ///(decay rate in 10's)
            
emessage_end();

            
message_begin(MSG_ONE SVC_TEMPENTITY,{0,0,0},players[m]);
            
ewrite_byte(TE_ELIGHT);

            
ewrite_short(iPlayers_index);

            
ewrite_coord(Origin[0]);
            
ewrite_coord(Origin[1]);
            
ewrite_coord(Origin[2]);

            
ewrite_coord(get_pcvar_num(g_radius));  ///(radius in 10's)

            //CS team RGB messaging
            
if(equal(glowteam"CT"))
                {
                    if (
entity_get_float(iPlayers_indexEV_FL_armorvalue) < 101.0)
                        {
                            
ewrite_byte(0);
                            
ewrite_byte(0);
                            
ewrite_byte(255);
                        }

                        else 
/* VIP */
                            
{
                                
ewrite_byte(0);
                                
ewrite_byte(255);
                                
ewrite_byte(0);
                            }

                    }

            if(
equal(glowteam"TERRORIST"))

                {
                    
ewrite_byte(255);
                    
ewrite_byte(0);
                    
ewrite_byte(0);
                }

            
ewrite_byte(get_pcvar_num(g_time));   ///life
            
ewrite_coord(get_pcvar_num(g_time));  ///(decay rate in 10's)
            
emessage_end();
        }
    }

sanimare is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-16-2021 , 08:25   Re: Glow instead of flashlight
Reply With Quote #23

Enable debug with glow_debug 1. Made an adjustment. Updated old post with the code to test.
__________________

Last edited by DJEarthQuake; 11-16-2021 at 18:06. Reason: Debug CVAR. Color. Retested.
DJEarthQuake is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-17-2021 , 15:51   Re: Glow instead of flashlight
Reply With Quote #24

Quote:
Originally Posted by DJEarthQuake View Post
Enable debug with glow_debug 1. Made an adjustment. Updated old post with the code to test.
I tried to compile with 1.8.2 that code u have posted and i get this:
Code:
//// glow_flashlight.sma
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight.sma(107) : error 017: undefined symbol "print_radio"
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight.sma(107) : warning 215: expression has no effect
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight.sma(107) : warning 215: expression has no effect
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight.sma(107) : error 001: expected token: ";", but found ")"
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight.sma(107) : error 029: invalid expression, assumed zero
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight.sma(107) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file compiled\glow_flashlight.amx (compile failed).
//
// Compilation Time: 0.11 sec
I also compiled with 1.9 and i compiled it, and it runs on server but i have same problem with not showing sprite after dying in same round until new comes.
sanimare is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-17-2021 , 16:14   Re: Glow instead of flashlight
Reply With Quote #25

Switch print_radio to print_chat. My bad. Will update script when I get a moment.
I got that and another spot corrected for 182.
__________________

Last edited by DJEarthQuake; 11-17-2021 at 16:22. Reason: 182
DJEarthQuake is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-17-2021 , 16:39   Re: Glow instead of flashlight
Reply With Quote #26

Quote:
Originally Posted by DJEarthQuake View Post
Switch print_radio to print_chat. My bad. Will update script when I get a moment.
I got that and another spot corrected for 182.
I fixed this line and compiled it after but it's same situation with not displaying glow after changing team or dying.

Code:
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight_v3.sma(114) : error 001: expected token: ";", but found ":"
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight_v3.sma(114) : error 029: invalid expression, assumed zero
// E:\PAWN\- The Legion (ReHLDS + 1.8.2) SoccerJam\glow_flashlight_v3.sma(114 -- 115) : warning 215: expression has no effect
//
// 2 Errors.
// Could not locate output file compiled\glow_flashlight_v3.amx (compile failed).
//
// Compilation Time: 0.12 sec
// ---------------------------

Last edited by sanimare; 11-17-2021 at 16:44.
sanimare is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-17-2021 , 22:31   Re: Glow instead of flashlight
Reply With Quote #27

Looking at that. It never compiled. You are inadvertently using old copy on your server. Happens to the best of us. Try the updated code on the post please. There was more than that 1 part that needed finessed once I got to the SMA. It's fine now. I checked from playing the game on 190 to making sure it compiles on 182. I switched teams multiple times and took control of bots but no other real players. Had debug on it said to whom it was sending it to and it matched up. When in 3rd person I could see the red or blue including the teleportation graphics cascading in red or blue to boot.
__________________
DJEarthQuake is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-18-2021 , 03:46   Re: Glow instead of flashlight
Reply With Quote #28

I did compiled it and put in server, and it acts the same, i died in same round or switched team and i can't do a signal above my head.

PHP Code:
/*
 * glow_flashlight.sma Toggle Flashlight and you glow depending on team.
 *
 * Copyright 2020 SPiNX
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 *
 * 2020-12-02  1.0 to 1.1 SPiNX
 * Updated so opposing team cannot see.
 *
*/

#include amxmodx
#tryinclude colorchat
#include engine
#include fakemeta

#define MAX_IP_LENGTH     16
#define MAX_NAME_LENGTH   32
#define MAX_PLAYERS       32
#define MAX_AUTHID_LENGTH 64

new bool:cool_down_active
new glowteam[MAX_IP_LENGTH], g_radiusg_timeoverhead_icon_ct,overhead_icon_t;
new 
playersMAX_PLAYERS ], team_nameMAX_NAME_LENGTH ], signalers_nameMAX_NAME_LENGTH ], playercount;
new 
Origin[3];
new 
g_debug

public plugin_init()
{
    
register_plugin("Team Glow flashlight""1.2""SPiNX");
    
register_impulse(100"client_impulse_flashlight");
    
g_radius register_cvar("glow_radius""20")
    
g_time register_cvar("glow_time""10")
    
g_debug register_cvar("glow_debug""0")
    
register_logevent("round_start"2"1=Round_Start");
    
register_logevent("round_end"2"1=Round_End");
}

public 
client_impulse_flashlight(iPlayers_index)

    
glowinsteadofflashlight(iPlayers_index);


public 
round_start()

    
cool_down_active false


public round_end()

    
cool_down_active true


public plugin_precache()
{
    new const 
model_ct[]="models/in_teleport.mdl"
    
new const model_t[]="models/out_teleport.mdl"

    
overhead_icon_ct precache_model(model_ct);
    
precache_generic(model_ct)
    
    
overhead_icon_t  precache_model(model_t);
    
precache_generic(model_t)
}

public 
glowinsteadofflashlight(iPlayers_index)
{
    
get_user_team(iPlayers_indexglowteamcharsmax(glowteam));

    if(
is_user_alive(iPlayers_index) && !cool_down_active)
    {
        new print = 
get_pcvar_num(g_debug)
        
get_user_origin(iPlayers_indexOrigin);
        
get_players(players,playercount,"e"glowteam)

        for (new 
m=0playercount; ++m)
        {

            if(print)
            {
                
server_print "Team is %s"glowteam
                client_print iPlayers_index
print_console"Team is %s"glowteam
            
}

            
get_user_name(players[m], team_namecharsmax(team_name) );

            if(!
is_user_bot(players[m]))
                
get_user_name(iPlayers_indexsignalers_namecharsmax(signalers_name) );

            if(print)
            {
                
client_print(iPlayers_indexprint_chat"Trying to send glow to %s",team_name);
                
client_print(players[m], print_chat"%s is signaling",signalers_name)
            }
            else
            {
               
                
#if AMXX_VERSION_NUM == 182
                #if defined ColorChat
                    
ColorChat(players[m], GREEN"^3Asking ^1for pass ^4%s",signalers_name) ;
                
#endif
                #else
                    
client_print_color iPlayers_indexprint_team_grey"^4Asking ^3for pass ^1%n",iPlayers_index ;
                
#endif
            
}
            
emessage_beginMSG_ONE_UNRELIABLESVC_TEMPENTITY, { 00}, players[m] );
            
ewrite_byte(TE_PLAYERATTACHMENT)
            
ewrite_byte(iPlayers_index)
            
ewrite_coord(MAX_AUTHID_LENGTH//(attachment origin.z = player origin.z + vertical offset)
            
if(equal(glowteam"CT"))
                
ewrite_short(overhead_icon_ct)
            else
                
ewrite_short(overhead_icon_t)
            
ewrite_short(MAX_IP_LENGTH//life * 10
            
emessage_end();

            
emessage_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY,{0,0,0},players[m]);
            
ewrite_byte(TE_DLIGHT);

            
ewrite_coord(Origin[0]);
            
ewrite_coord(Origin[1]);
            
ewrite_coord(Origin[2]);

            
ewrite_byte(get_pcvar_num(g_radius)); ///(radius in 10's)

            //CS team RGB messaging
            
if(equal(glowteam"CT"))
            {
                if (
entity_get_float(iPlayers_indexEV_FL_armorvalue) < 101.0)
                {
                    
ewrite_byte(0);
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                }

                else 
/* VIP */
                
{
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                    
ewrite_byte(0);
                }

            }

            else

            {
                
ewrite_byte(255);
                
ewrite_byte(0);
                
ewrite_byte(0);
            }

            
ewrite_byte(get_pcvar_num(g_time));  ///life
            
ewrite_byte(get_pcvar_num(g_time));  ///(decay rate in 10's)
            
emessage_end();

            
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY,{0,0,0},players[m]);
            
ewrite_byte(TE_ELIGHT);

            
ewrite_short(iPlayers_index);

            
ewrite_coord(Origin[0]);
            
ewrite_coord(Origin[1]);
            
ewrite_coord(Origin[2]);

            
ewrite_coord(get_pcvar_num(g_radius));  ///(radius in 10's)

            //CS team RGB messaging
            
if(equal(glowteam"CT"))
            {
                if (
entity_get_float(iPlayers_indexEV_FL_armorvalue) < 101.0)
                {
                    
ewrite_byte(0);
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                }

                else 
/* VIP */
                
{
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                    
ewrite_byte(0);
                }

            }

            else

            {
                
ewrite_byte(255);
                
ewrite_byte(0);
                
ewrite_byte(0);
            }

            
ewrite_byte(get_pcvar_num(g_time));   ///life
            
ewrite_coord(get_pcvar_num(g_time));  ///(decay rate in 10's)
            
emessage_end();
        }


    }



sanimare is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 11-18-2021 , 09:02   Re: Glow instead of flashlight
Reply With Quote #29

MSG_ONE_UNRELIABLE drops messages. MSG_ONE does not. The trade-off for that mission-critical capacity is less peace of mind knowing that it has a way of kicking clients and shutting down servers if there is no headroom or something else is askew. There are 2 places in script whereby you can try that. When testing with Amx 182 when it did act up last year I had to use the command MAP, to change level, says server is shutting down and kicks everybody to refresh server and get it functioning again. I realize that is not a great plan in the midst of a clan match so do it well ahead of time. You can also seek other less expensive graphics for signaling. Unsure if that was Amx 182 or from me updating script but it was always controllable and temporary. I tested again on Amx 110 and no problem found. Switched from CT to T. Everything works as expected.

Tested again fine with CZ Amx 182.
__________________

Last edited by DJEarthQuake; 11-18-2021 at 09:36. Reason: 182 post test
DJEarthQuake is offline
sanimare
Senior Member
Join Date: Sep 2010
Old 11-18-2021 , 12:48   Re: Glow instead of flashlight
Reply With Quote #30

Quote:
Originally Posted by DJEarthQuake View Post
MSG_ONE_UNRELIABLE drops messages. MSG_ONE does not. The trade-off for that mission-critical capacity is less peace of mind knowing that it has a way of kicking clients and shutting down servers if there is no headroom or something else is askew. There are 2 places in script whereby you can try that. When testing with Amx 182 when it did act up last year I had to use the command MAP, to change level, says server is shutting down and kicks everybody to refresh server and get it functioning again. I realize that is not a great plan in the midst of a clan match so do it well ahead of time. You can also seek other less expensive graphics for signaling. Unsure if that was Amx 182 or from me updating script but it was always controllable and temporary. I tested again on Amx 110 and no problem found. Switched from CT to T. Everything works as expected.

Tested again fine with CZ Amx 182.

AMX Mod X 1.9.0.5263 running on server.
I tried everything, i die, i switch team, sprite don't show up anymore, until i restart map, round or round ends..., final script:
PHP Code:
/*
 * glow_flashlight.sma Toggle Flashlight and you glow depending on team.
 *
 * Copyright 2020 SPiNX
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 *
 * 2020-12-02  1.0 to 1.1 SPiNX
 * Updated so opposing team cannot see.
 *
*/

#include amxmodx
#tryinclude colorchat
#include engine
#include fakemeta

#define MAX_IP_LENGTH     16
#define MAX_NAME_LENGTH   32
#define MAX_PLAYERS       32
#define MAX_AUTHID_LENGTH 64

new bool:cool_down_active
new glowteam[MAX_IP_LENGTH], g_radiusg_timeoverhead_icon_ct,overhead_icon_t;
new 
playersMAX_PLAYERS ], team_nameMAX_NAME_LENGTH ], signalers_nameMAX_NAME_LENGTH ], playercount;
new 
Origin[3];
new 
g_debug

public plugin_init()
{
    
register_plugin("Team Glow flashlight""1.2""SPiNX");
    
register_impulse(100"client_impulse_flashlight");
    
g_radius register_cvar("glow_radius""20")
    
g_time register_cvar("glow_time""10")
    
g_debug register_cvar("glow_debug""1")
    
register_logevent("round_start"2"1=Round_Start");
    
register_logevent("round_end"2"1=Round_End");
}

public 
client_impulse_flashlight(iPlayers_index)

    
glowinsteadofflashlight(iPlayers_index);


public 
round_start()

    
cool_down_active false


public round_end()

    
cool_down_active true


public plugin_precache()
{
    new const 
model_ct[]="sprites/ct_pass.spr"
    
new const model_t[]="sprites/t_pass.spr"

    
overhead_icon_ct precache_model(model_ct);
    
precache_generic(model_ct)
    
    
overhead_icon_t  precache_model(model_t);
    
precache_generic(model_t)
}

public 
glowinsteadofflashlight(iPlayers_index)
{
    
get_user_team(iPlayers_indexglowteamcharsmax(glowteam));

    if(
is_user_alive(iPlayers_index) && !cool_down_active)
    {
        new print = 
get_pcvar_num(g_debug)
        
get_user_origin(iPlayers_indexOrigin);
        
get_players(players,playercount,"e"glowteam)

        for (new 
m=0playercount; ++m)
        {

            if(print)
            {
                
server_print "Team is %s"glowteam
                client_print iPlayers_index
print_console"Team is %s"glowteam
            
}

            
get_user_name(players[m], team_namecharsmax(team_name) );

            if(!
is_user_bot(players[m]))
                
get_user_name(iPlayers_indexsignalers_namecharsmax(signalers_name) );

            if(print)
            {
                
//client_print(iPlayers_index, print_chat, "Trying to send glow to %s",team_name);
                //client_print(players[m], print_chat, "%s is signaling",signalers_name)
            
}
            else
            {
               
                
#if AMXX_VERSION_NUM == 182
                #if defined ColorChat
                    
ColorChat(players[m], GREEN"^3Asking ^1for pass ^4%s",signalers_name) ;
                
#endif
                #else
                    
client_print_color iPlayers_indexprint_team_grey"^4Asking ^3for pass ^1%n",iPlayers_index ;
                
#endif
            
}
            
emessage_beginMSG_ONESVC_TEMPENTITY, { 00}, players[m] );
            
ewrite_byte(TE_PLAYERATTACHMENT)
            
ewrite_byte(iPlayers_index)
            
ewrite_coord(MAX_AUTHID_LENGTH//(attachment origin.z = player origin.z + vertical offset)
            
if(equal(glowteam"CT"))
                
ewrite_short(overhead_icon_ct)
            else
                
ewrite_short(overhead_icon_t)
            
ewrite_short(MAX_IP_LENGTH//life * 10
            
emessage_end();

            
emessage_begin(MSG_ONESVC_TEMPENTITY,{0,0,0},players[m]);
            
ewrite_byte(TE_DLIGHT);

            
ewrite_coord(Origin[0]);
            
ewrite_coord(Origin[1]);
            
ewrite_coord(Origin[2]);

            
ewrite_byte(get_pcvar_num(g_radius)); ///(radius in 10's)

            //CS team RGB messaging
            
if(equal(glowteam"CT"))
            {
                if (
entity_get_float(iPlayers_indexEV_FL_armorvalue) < 101.0)
                {
                    
ewrite_byte(0);
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                }

                else 
/* VIP */
                
{
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                    
ewrite_byte(0);
                }

            }

            else

            {
                
ewrite_byte(255);
                
ewrite_byte(0);
                
ewrite_byte(0);
            }

            
ewrite_byte(get_pcvar_num(g_time));  ///life
            
ewrite_byte(get_pcvar_num(g_time));  ///(decay rate in 10's)
            
emessage_end();

            
message_begin(MSG_ONESVC_TEMPENTITY,{0,0,0},players[m]);
            
ewrite_byte(TE_ELIGHT);

            
ewrite_short(iPlayers_index);

            
ewrite_coord(Origin[0]);
            
ewrite_coord(Origin[1]);
            
ewrite_coord(Origin[2]);

            
ewrite_coord(get_pcvar_num(g_radius));  ///(radius in 10's)

            //CS team RGB messaging
            
if(equal(glowteam"CT"))
            {
                if (
entity_get_float(iPlayers_indexEV_FL_armorvalue) < 101.0)
                {
                    
ewrite_byte(0);
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                }

                else 
/* VIP */
                
{
                    
ewrite_byte(0);
                    
ewrite_byte(255);
                    
ewrite_byte(0);
                }

            }

            else

            {
                
ewrite_byte(255);
                
ewrite_byte(0);
                
ewrite_byte(0);
            }

            
ewrite_byte(get_pcvar_num(g_time));   ///life
            
ewrite_coord(get_pcvar_num(g_time));  ///(decay rate in 10's)
            
emessage_end();
        }


    }




Last edited by sanimare; 11-18-2021 at 12:48.
sanimare is offline
Reply


Thread Tools
Display Modes

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 01:35.


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