OnPlayerConnect help
#7

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);
}
Reply


Messages In This Thread
OnPlayerConnect help - by TazmaNiax - 16.05.2014, 02:47
Re: OnPlayerConnect help - by Laure - 16.05.2014, 03:24
Re: OnPlayerConnect help - by TazmaNiax - 16.05.2014, 03:27
Re: OnPlayerConnect help - by Laure - 16.05.2014, 03:30
Re: OnPlayerConnect help - by Affan - 16.05.2014, 03:32
Re: OnPlayerConnect help - by Laure - 16.05.2014, 03:33
Re: OnPlayerConnect help - by SAMProductions - 16.05.2014, 03:40
Re: OnPlayerConnect help - by Affan - 16.05.2014, 03:50
Re: OnPlayerConnect help - by SAMProductions - 16.05.2014, 04:04
Re: OnPlayerConnect help - by biker122 - 16.05.2014, 04:28

Forum Jump:


Users browsing this thread: 2 Guest(s)