vip glow
Posted: 10 Oct 2018, 05:49
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.
- public glow()
- {
- for(new id = 1; id <= g_iMaxPlayers; id++)
- {
- if (!is_user_alive(id))
- continue
- if (get_pcvar_num(g_pCvarVipGlow) != 0)
- {
- // Set Glow For VIP Players
- for (new i = 1; i <= g_iMaxPlayers; i++)
- {
- if (!is_user_alive(i))
- 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)
- }
- }
- }
- }
- }