Resolved vip glow

Coding Help/Re-API Supported
Post Reply
shady101852
Member
Member
United States of America
Posts: 27
Joined: 1 Year Ago
Has thanked: 9 times
Been thanked: 2 times
Contact:

vip glow

#1

Post by shady101852 » 1 Year Ago

I copied the code for the leader glow into the vip system plugin and modified the names of the cvars etc. The glow works when im alone in the server but after another player joins my glow is removed after a round restart. Does anyone know what I need to do to keep the glow? below is the code minus the cvars.
  1. public glow()
  2. {
  3.     for(new id = 1; id <= g_iMaxPlayers; id++)
  4.     {
  5.         if (!is_user_alive(id))
  6.             continue
  7.            
  8.         if (get_pcvar_num(g_pCvarVipGlow) != 0)
  9.         {
  10.             // Set Glow For VIP Players
  11.             for (new i = 1; i <= g_iMaxPlayers; i++)
  12.             {
  13.                 if (!is_user_alive(i))
  14.                     continue
  15.                 if (ze_get_vip_flags(id) & VIP_A) // if user is vip
  16.  
  17.                 {
  18.                     if (get_pcvar_num(g_pCvarVipGlowRandom) == 0)
  19.                     {
  20.                         Set_Rendering(i, kRenderFxGlowShell, get_pcvar_num(g_pCvarVipGlowColors[Red]), get_pcvar_num(g_pCvarVipGlowColors[Green]), get_pcvar_num(g_pCvarVipGlowColors[Blue]), kRenderNormal, 40)
  21.                     }
  22.                     else
  23.                     {
  24.                         Set_Rendering(i, kRenderFxGlowShell, random(256), random(256), random(256), kRenderNormal, 40)
  25.                     }  
  26.                 }
  27.                 else
  28.                 {
  29.                     Set_Rendering(i)
  30.                 }
  31.             }
  32.         }
  33.     }  
  34. }

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 626
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 49 times
Age: 19
Contact:

#2

Post by Mohamed Alaa » 1 Year Ago

Code: Select all

public glow()
{
	if (get_pcvar_num(g_pCvarVipGlow) != 0)
	{
		for (new id = 1; id <= g_iMaxPlayers; id++)
		{
			if (!is_user_alive(id))
				continue
			   
			if (ze_get_vip_flags(id) & VIP_A) // if user is vip
			{
				if (get_pcvar_num(g_pCvarVipGlowRandom) == 0)
				{
					Set_Rendering(i, kRenderFxGlowShell, get_pcvar_num(g_pCvarVipGlowColors[Red]), get_pcvar_num(g_pCvarVipGlowColors[Green]), get_pcvar_num(g_pCvarVipGlowColors[Blue]), kRenderNormal, 40)
				}
				else
				{
					Set_Rendering(i, kRenderFxGlowShell, random(256), random(256), random(256), kRenderNormal, 40)
				}  
			}
			else
			{
				Set_Rendering(i)
			}
		}
	}
}
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

shady101852
Member
Member
United States of America
Posts: 27
Joined: 1 Year Ago
Has thanked: 9 times
Been thanked: 2 times
Contact:

#3

Post by shady101852 » 1 Year Ago

I will try it when I get home thanks

shady101852
Member
Member
United States of America
Posts: 27
Joined: 1 Year Ago
Has thanked: 9 times
Been thanked: 2 times
Contact:

#4

Post by shady101852 » 1 Year Ago

thanks it worked

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest