Quote:
Originally Posted by Affan
pawn Код:
new string[128]; if(PlayerInfo[playerid][pAdmin] >= 1) { format(string, sizeof(string), "Server: You are logged in as level %d administrator", PlayerInfo[playerid][pAdmin]); SendClientMessageToAll( COLOR_WHITE, string); }
Remember to put this after loading player's data.
|
If you use that with SendClientMessageToAll some others will react "w0ah, i am logged in as Administrator",
it is because of "Server: You are logged in as level %d administrator".
Like this (?) :-
(SendClientMessage)
pawn Код:
new string[128];
if(PlayerInfo[playerid][pAdmin])
{
format(string, sizeof(string), "Server: You are logged in as Level %d Administrator", PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, -1, string);
}
(SendClientMessageToAll)
pawn Код:
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(PlayerInfo[playerid][pAdmin])
{
format(string, sizeof(string), "Administrator %s Has been joined the server", pName);
SendClientMessage(-1, string);
}
(Fresh SendClientMessageToAll)
pawn Код:
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(PlayerInfo[playerid][pAdmin])
{
format(string, sizeof(string), "{FFFFFF}Level %d Administrator {%06x}%s(%d) {FFFFFF}Has been joined the server", PlayerInfo[playerid][pAdmin], (GetPlayerColor(playerid) >>> 8), pName, playerid);
SendClientMessage(-1, string);
}