Bugsss
#1

Hello guys, I just scripted out this... But I don't know how to fix it. :/ I want like
"VIP %s has spawned."
"Server Owner %s has spawned."

How? Here's my script.

pawn Код:
if(IsPlayerVipMember(playerid))
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: VIP %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }
    else
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: Player %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }
   
    if(IsPlayerLuxAdminLevel(playerid, 1))
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: Helper %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }

    if(IsPlayerLuxAdminLevel(playerid, 2))
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: Moderator %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }
   
    if(IsPlayerLuxAdminLevel(playerid, 3))
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: Administrator %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }
   
    if(IsPlayerLuxAdminLevel(playerid, 4))
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: Lead Administrator %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }
   
    if(IsPlayerLuxAdminLevel(playerid, 5))
    {
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    format (string,sizeof(string),"[SPAWNMSG]: Server Owner %s has spawned.", name);
    SendClientMessageToAll(0x5A369600,string);
    }
Reply
#2

Wait, you want this or you do NOT want it?

Seeing that it exists... Just delete it all and it will dissapear.

Or i just don't understand you?
Reply
#3

Are you sure this is under OnPlayerSpawn callback?
Reply
#4

Fine, I created another one on LuxAdmin.pwn... Problem tho.

pawn Код:
if(AccInfo[playerid][level])
    {
        switch(AccInfo[playerid][level])
        {
            case 1: AdmRank = "Helper";
            case 2: AdmRank = "Moderator";
            case 3: AdmRank = "Administrator";
            case 4: AdmRank = "Lead Administrator";
            case 5: AdmRank = "Server Owner";
        }
        new name[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string),"[SPAWNMSG] %s %s has spawned.", name, AdmRank);
        SendClientMessage(playerid,0x00C378AA,string);
    }
Errors:
Код:
C:\Users\Kelvin\Desktop\Scripting\filterscripts\LuxAdmin.pwn(987) : error 017: undefined symbol "level"
C:\Users\Kelvin\Desktop\Scripting\filterscripts\LuxAdmin.pwn(989) : error 017: undefined symbol "level"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#5

Easy, there is no part called level in your enum
Reply
#6

It's on LuxAdmin.pwn!!
Reply
#7

Pawno is case sensitive. Are you sure it is 'level' instead of 'Level'.
Reply
#8

your level is in lower case. Make it in upper case.
I just checked in LuxAdmin and it has upper case

pawn Код:
AccInfo[playerid][Level]
Reply
#9

Thanks, Romel, but it only works for Server Owner, I don't know how to make it for all levels...

pawn Код:
if(AccInfo[playerid][Level])
    {
        switch(AccInfo[playerid][Level])
        {
            case 1: AdmRank = "Helper";
            case 2: AdmRank = "Moderator";
            case 3: AdmRank = "Administrator";
            case 4: AdmRank = "Lead Administrator";
            case 5: AdmRank = "Server Owner";
        }
        new name[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string),"[SPAWNMSG] %s %s has spawned.", AdmRank,name);
        SendClientMessage(playerid,0x00C378AA,string);
    }
Comment on the added side so I can learn that easily. :P
Reply
#10

I just figured I put SendClientMessage. :X
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)