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

Solved [Need help for the Glow]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 07-24-2018 , 00:20   [Need help for the Glow]
Reply With Quote #1

I have some code to disable glow survivor but keep name
PHP Code:
bool bGlowDisabled[MAXPLAYERS+1]; 

public 
void OnPluginStart() 

    
RegAdminCmd("sm_survivor_glow"ToggleSurvivorGlowADMFLAG_ROOT"Toggles the survivor glow"); 


public 
Action ToggleSurvivorGlow(int clientint args

    if (
client == || !IsClientInGame(client)) 
    { 
        return 
Plugin_Handled
    } 
     
    for (
int i 1<= MaxClientsi++) 
    { 
        if (
IsClientInGame(i) && GetClientTeam(i) == && IsPlayerAlive(i)) 
        { 
            if (!
bGlowDisabled[i] && GetEntProp(iProp_Send"m_bSurvivorGlowEnabled") == 1
            { 
                
bGlowDisabled[i] = true
                
SetEntProp(iProp_Send"m_bSurvivorGlowEnabled"0); 
            } 
            else if (
bGlowDisabled[i] && GetEntProp(iProp_Send"m_bSurvivorGlowEnabled") == 0
            { 
                
bGlowDisabled[i] = false
                
SetEntProp(iProp_Send"m_bSurvivorGlowEnabled"1); 
            } 
        } 
    } 
     
    return 
Plugin_Handled

This plugin works.
But when someone else connect, create a new bot. A new bot still have glow. I tried disabled and enabled with sm_survivor_glow but is not working. Anybody can fix it ? Please help me

P/s: Nvm, i fixed it

Last edited by hoanganh81097; 07-24-2018 at 15:41.
hoanganh81097 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 07-24-2018 , 08:23   Re: [Need help for the Glow]
Reply With Quote #2

What exactly are you trying to do. Also what game is this for. I assume L4D/L4D2? If thats the case use this.

Code:
public void OnMapStart()
{
	SetConVarInt(FindConVar("sv_disable_glow_survivors"), 1); //Disable Survivor Glows
}
This will disable survivor glows on the server. What u were doing up above will only disable the glows for those on the server at the time of using the command. Use player_spawn eventhook if you want to catch all players on the server.

Last edited by MasterMind420; 07-24-2018 at 08:26.
MasterMind420 is offline
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 07-24-2018 , 13:16   Re: [Need help for the Glow]
Reply With Quote #3

Quote:
Originally Posted by MasterMind420 View Post
What exactly are you trying to do. Also what game is this for. I assume L4D/L4D2? If thats the case use this.

Code:
public void OnMapStart()
{
	SetConVarInt(FindConVar("sv_disable_glow_survivors"), 1); //Disable Survivor Glows
}
This will disable survivor glows on the server. What u were doing up above will only disable the glows for those on the server at the time of using the command. Use player_spawn eventhook if you want to catch all players on the server.
I wanna Disable glow survivor but KEEP THE NAME. sv_disable_glow_survivors disable glow and name

Last edited by hoanganh81097; 07-24-2018 at 13:17.
hoanganh81097 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 12:22.


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