Tiny little help
#1

Hi fellas, I want all admins to have the same name colour when they are online (blue)

if(!IsPlayerLuxAdminLevel(playerid, 1))
{
SetPlayerColor(playerid,blue);
}

Its not working. I have this under OnPlayerConnect

What am I missing?

Thanks!
Reply
#2

Do you have any other SetPlayerColor in your script?
Reply
#3

Just this under onplayerconnect


SetPlayerColor(playerid, PlayerColors[playerid]);
Reply
#4

You have to set admins color after they log in and get their admin status. Nobody is admin in OnPlayerConnect.
Reply
#5

So under onplayerspawn?

EDIT

nope thats not it, I get the same error 010 on this line

if(!IsPlayerLuxAdminLevel(playerid, 1))
Reply
#6

Quote:
Originally Posted by Prometheus
Посмотреть сообщение
So under onplayerspawn?
Yes, might work.
Reply
#7

Read above
Reply
#8

You're getting an error? Show the whole code.
Reply
#9

pawn Код:
if(!IsPlayerLuxAdminLevel(playerid,1))
{
SetPlayerColor(playerid, BLUE);
}
pawn Код:
error 010: invalid function or declaration
pawn Код:
if(!IsPlayerLuxAdminLevel(playerid,1))
Reply
#10

It's inside OnPlayerSpawn?
Reply
#11

Yup.

I'll be damned, it works now

pawn Код:
public OnPlayerSpawn(playerid)
{
    PlayerPlaySound(playerid, 1184, -1370.2362,-256.3250,15.0000);
    SetPlayerHealth(playerid, 100);
    SetPlayerPos(playerid,-543.7243,2592.7314,53.5156);
    IsInDM[playerid] = 0;
    nojump2[playerid] = 0;
    ResetPlayerWeapons(playerid);
    if(!IsPlayerLuxAdminLevel(playerid,1))
    {
    SetPlayerColor(playerid, COLOR_RED);
    }
    TextDrawShowForPlayer(playerid, Textdraw1);
    SetPlayerWeather(playerid,1);
    SetPlayerVirtualWorld(playerid,0);
    return 1;
}
Reply
#12

Show more code.
Reply
#13

No...damn it!

Still just random colour!
Reply
#14

Remove the '!'

pawn Код:
if(IsPlayerLuxAdminLevel(playerid,1))
Reply
#15

I'll be damned, it works! Thank you very much!
Reply
#16

Ahh damn there was one more thing!
Now, every admin is blue, all well and good

But lets say I want to have different colour for admin level 10? Is that possible, or will it mess everything up?

Or can I just copy but change level to 10 instead of 1?
Reply
#17

pawn Код:
if(IsPlayerLuxAdminLevel(playerid,10))
    {
        SetPlayerColor(playerid, COLOR_RED); // level 10 admins color
    }
    else if(IsPlayerLuxAdminLevel(playerid,1))
    {
        SetPlayerColor(playerid, COLOR_RED); // other admins color
    }
Reply
#18

Ahh yes of course! Im getting so rusty. Thank you again!!
Reply
#19

don't loose:
Quote:

#include <ladmin>

do you want to set the color of the players who are not administrators?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)