Raised This Month: $51 Target: $400
 12% 

check if a user is rendering(glowing)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ynet
Member
Join Date: Aug 2017
Location: israel
Old 05-02-2020 , 15:04   check if a user is rendering(glowing)
Reply With Quote #1

is there a way to check if a person is glowing?


here is an example of how i want to check it



PHP Code:
public KillRender()
{
    
    
    new 
players[32], num;
    
get_playersplayersnum"ch" );
    for( new 
0numi++ )
    {
        
        
        if(
get_user_team(players[i]) == 2)
        continue;
        
        
        if(
get_user_rendering(players[i]))
        {
            
            
user_silentkill(players[i])
            
        }
        
    }
    
    


Last edited by Ynet; 05-02-2020 at 15:05.
Ynet is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-02-2020 , 15:50   Re: check if a user is rendering(glowing)
Reply With Quote #2

It depends on which part of the glow effect you want to check. See the API to understand how the function works - https://www.amxmodx.org/api/fun/get_user_rendering

Bear in mind this function is only available in AMXX 1.9 or above.

PS: there's no point in using "get_user_team" there. Simply add the "e" flag in "get_players" and set it to retrieve only CT players.
__________________

Last edited by OciXCrom; 05-02-2020 at 15:50.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Ynet
Member
Join Date: Aug 2017
Location: israel
Old 05-02-2020 , 16:41   Re: check if a user is rendering(glowing)
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
It depends on which part of the glow effect you want to check. See the API to understand how the function works - https://www.amxmodx.org/api/fun/get_user_rendering

Bear in mind this function is only available in AMXX 1.9 or above.

PS: there's no point in using "get_user_team" there. Simply add the "e" flag in "get_players" and set it to retrieve only CT players.
the get_user_team part is less relevant i just wanted to give an example on how i want to do it

and unfortnately i don't think i have the new amxx version, any other way to do it with the older versions?

Last edited by Ynet; 05-02-2020 at 16:41.
Ynet is offline
Vieni
Member
Join Date: Apr 2018
Old 05-02-2020 , 16:56   Re: check if a user is rendering(glowing)
Reply With Quote #4

Quote:
Originally Posted by Ynet View Post
the get_user_team part is less relevant i just wanted to give an example on how i want to do it

and unfortnately i don't think i have the new amxx version, any other way to do it with the older versions?
If you're putting the rendering, you can just easily use these:
Code:
    
if(entity_get_int(id, EV_INT_rendermode) == your rendermode)

or

if(entity_get_int(id, EV_INT_renderfx) == your render fx)

or

if(entity_get_float(id, EV_FL_renderamt) == your render amount)
These are engine functions, for fakemeta use these:
Code:
pev(id, pev_rendermode or pev_renderfx or pev_renderamt)

Last edited by Vieni; 05-02-2020 at 16:56.
Vieni is offline
Ynet
Member
Join Date: Aug 2017
Location: israel
Old 05-02-2020 , 23:52   Re: check if a user is rendering(glowing)
Reply With Quote #5

Quote:
Originally Posted by Vieni View Post
If you're putting the rendering, you can just easily use these:
Code:
    
if(entity_get_int(id, EV_INT_rendermode) == your rendermode)

or

if(entity_get_int(id, EV_INT_renderfx) == your render fx)

or

if(entity_get_float(id, EV_FL_renderamt) == your render amount)
These are engine functions, for fakemeta use these:
Code:
pev(id, pev_rendermode or pev_renderfx or pev_renderamt)

PHP Code:
public checkglow(id)
{
    
    if(
pev(idpev_renderfx ))
    {
        
ColorChat(id,"Glowing");
    }
    else
    {
        
ColorChat(id,"Not Glowing");
    }
    

found the perfect match, thank you.
Ynet is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 05-03-2020 , 13:20   Re: check if a user is rendering(glowing)
Reply With Quote #6

Quote:
Originally Posted by Ynet View Post
PHP Code:
public checkglow(id)
{
    
    if(
pev(idpev_renderfx ))
    {
        
ColorChat(id,"Glowing");
    }
    else
    {
        
ColorChat(id,"Not Glowing");
    }
    

found the perfect match, thank you.
PHP Code:
public checkglow(id)
{
    
    if(
pev(idpev_renderfx ) == kRenderFxGlowShell)
    {
        
ColorChat(id,"Glowing");
    }
    else
    {
        
ColorChat(id,"Not Glowing");
    }
    

__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
ZaKaRiAMaGh
Junior Member
Join Date: Apr 2020
Location: Morocco
Old 05-06-2020 , 12:25   Re: check if a user is rendering(glowing)
Reply With Quote #7

i need help here
any one to tell me what s the expresion if user is alive
ZaKaRiAMaGh is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-06-2020 , 13:10   Re: check if a user is rendering(glowing)
Reply With Quote #8

"is_user_alive" returns if the client is alive.
"if" in programming is a conditional statement.

That said, if (is_user_alive(index)) means that something will happen only if the player is alive.
__________________








CrazY. 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 05:34.


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