if ((PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel])
#1

PHP код:
    if(ServerInfo[ReadPMs] == && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
    {
        new 
string[128],recievername[MAX_PLAYER_NAME];
        
GetPlayerName(playeridstringsizeof(string)); GetPlayerName(idrecievernamesizeof(recievername));
        
format(stringsizeof(string), "***PM: %s To %s: %s"stringrecievernamegMessage);
        for (new 
0MAX_PLAYERSa++) if ((PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel]) && != playerid)
        
SendClientMessage(agreystring);
        
SaveIn("PMs"string);
    }
    
GetPlayerName(id,iName,sizeof(iName));
    
GetPlayerName(playerid,pmName,sizeof(pmName));
    
format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
    
SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
    
format(Message,sizeof(Message),"** %s(%d): %s",pmName,playerid,gMessage);
    
SendClientMessage(id,PM_INCOMING_COLOR,Message);
    
PlayerPlaySound(id,1085,0.0,0.0,0.0);
    
printf("PM: %s",Message);
    return 
1;

all admin can read pms private .. or only hight level admin??
Reply
#2

Explain your problem please?
Reply
#3

Quote:
Originally Posted by Meller
Посмотреть сообщение
Explain your problem please?
PHP код:
PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) 
what it mean?
Reply
#4

It checks if their Level variable is not the Max Admin level, example:
Your admin level is 5, and the max level there is, it's 6.

So it'd be if 5 is NOT 6, then continue.
if(5 IS NOT 6) //
Reply
#5

Quote:
Originally Posted by Meller
Посмотреть сообщение
It checks if their Level variable is not the Max Admin level, example:
Your admin level is 5, and the max level there is, it's 6.

So it'd be if 5 is NOT 6, then continue.
if(5 IS NOT 6) //
help me to make this code all admins can read pms
Reply
#6

Quote:
Originally Posted by s3ek
Посмотреть сообщение
help me to make this code all admins can read pms
just change this
PHP код:
(PlayerInfo[a][Level] >= ServerInfo[MaxAdminLevel]) 
to this
PHP код:
(PlayerInfo[a][Level] >= 1
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)