Solved vip glow

Coding Help/Re-API Supported
Post Reply
shady101852
Member
Member
United States of America
Posts: 27
Joined: 5 years ago
Contact:

vip glow

#1

Post by shady101852 » 5 years 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
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#2

Post by Night Fury » 5 years 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 private projects.
Discord: Fury#7469
Image

shady101852
Member
Member
United States of America
Posts: 27
Joined: 5 years ago
Contact:

#3

Post by shady101852 » 5 years ago

I will try it when I get home thanks

shady101852
Member
Member
United States of America
Posts: 27
Joined: 5 years ago
Contact:

#4

Post by shady101852 » 5 years ago

thanks it worked

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 5 guests