AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Adminglow doesn't work :( (https://forums.alliedmods.net/showthread.php?t=48556)

BoOnSpoOn 12-14-2006 12:02

Adminglow doesn't work :(
 
Hi I have ProKreedz (from www.Xtreme-Jumps.eu) and I want to use Adminglow, that Admins glow in a specific color (I 'ld like if thy glowed in pink but if anyone can make them glowing in ANY Color it is OK ^^)
Then there is also a function that if you write /help a red message appears on the right, but if i write /help the message isn't red it is in my config color :(
But it doesn't work in this form (both ones):

public glow(id) {
new colors[3]
if(needhelp[id-1] && get_pcvar_num(kz_help) == 1)
colors = {255,0,0}
else if(access(id,KZ_LEVEL) && get_pcvar_num(kz_adminglow) == 1)
colors = {255,0,100}
else
colors = {0,0,0}

set_rendering(id,kRenderFxGlowShell,colors[0],colors[1],colors[2],kRenderNormal,25)

Who can help me? :)

slmclarengt 12-14-2006 17:24

Re: Adminglow doesn't work :(
 
Quote:

Originally Posted by BoOnSpoOn (Post 415333)
Hi I have ProKreedz (from www.Xtreme-Jumps.eu) and I want to use Adminglow, that Admins glow in a specific color (I 'ld like if thy glowed in pink but if anyone can make them glowing in ANY Color it is OK ^^)
Then there is also a function that if you write /help a red message appears on the right, but if i write /help the message isn't red it is in my config color :(
But it doesn't work in this form (both ones):

public glow(id) {
new colors[3]
if(needhelp[id-1] && get_pcvar_num(kz_help) == 1)
colors = {255,0,0}
else if(access(id,KZ_LEVEL) && get_pcvar_num(kz_adminglow) == 1)
colors = {255,0,100}
else
colors = {0,0,0}

set_rendering(id,kRenderFxGlowShell,colors[0],colors[1],colors[2],kRenderNormal,25)

Who can help me? :)


I think you are looking for replacing
Code:
set_rendering(id,kRenderFxGlowShell,colors[0],colors[1],colors[2],kRenderNormal,25)

to

Code:
set_user_rendering(id,kRenderFxGlowShell,colors[0],colors[1],colors[2],kRenderNormal,25)

because set_rendering does not affect players, rather entities. Set_user_rendering is a function of the "fun" include so you must
Code:
 #include <fun>

Cheers!
Slmclarengt

BoOnSpoOn 12-15-2006 05:34

Re: Adminglow doesn't work :(
 
Doesn't work, only if i change the down line on the bottom then it works, but then i glow even if i put it ON or OFF ^^
Well maybe there's a problem because of
colors[0],colors[1],colors[2] I mean because there are just 2 colors, 0 0 0 for not glowing and 0 255 0 for green gowing oO

dutchmeat 12-15-2006 05:47

Re: Adminglow doesn't work :(
 
What claren said, try this:

Code:
#include <fun> new needhelp[33] public HelpCommand(id){ needhelp[id] = 1 console_print(id,"You requested help and you should be glowing") glow(id) } public glow(id) { if(needhelp[id] && get_pcvar_num(kz_help) == 1){  set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25) }else if(access(id,KZ_LEVEL) && get_pcvar_num(kz_adminglow) == 1){  set_user_rendering(id,kRenderFxGlowShell,255,0,100,kRenderNormal,25) } }

BoOnSpoOn 12-16-2006 05:22

Re: Adminglow doesn't work :(
 
If i replace the old code with your ones there is the following problem :
/home/groups/amxmodx/tmp3/phpV8OWEv.sma(200) : error 021: symbol already defined: "needhelp"
/home/groups/amxmodx/tmp3/phpV8OWEv.sma(202 -- 203) : warning 213: tag mismatch
compiling failed...

BoOnSpoOn 12-16-2006 05:39

Re: Adminglow doesn't work :(
 
I give you a link from the .sma so you are able to see the whole thing ^^

[ --<-@ ] Black Rose 12-16-2006 05:59

Re: Adminglow doesn't work :(
 
Broken, just post it here.

BoOnSpoOn 12-16-2006 06:45

Re: Adminglow doesn't work :(
 
Sorry^^ Now it works...Here's the link to download directly :
http://mouzbotz.mo.ohost.de/ProKreedz.sma
When You Downloaded It You'll See Why I Didn't Post It

dutchmeat 12-16-2006 14:05

Re: Adminglow doesn't work :(
 
Quote:

Originally Posted by BoOnSpoOn (Post 415963)
If i replace the old code with your ones there is the following problem :
/home/groups/amxmodx/tmp3/phpV8OWEv.sma(200) : error 021: symbol already defined: "needhelp"
/home/groups/amxmodx/tmp3/phpV8OWEv.sma(202 -- 203) : warning 213: tag mismatch
compiling failed...

Do not include 'new needhelp[33]' in your code, because it is already defined...

[ --<-@ ] Black Rose 12-17-2006 06:54

Re: Adminglow doesn't work :(
 
He has allready fixed that, and it compiles fine.
"255, 0, 255" is pink.


All times are GMT -4. The time now is 06:58.

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