Send Connect/Left message
#6

Код:
public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], string[64+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
 
    format(string, sizeof(string), "[ADMIN] %s has disconnected from the server.", name);
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		SendClientMessage(0xC4C4C4FF, string);
	}
    return 1;
}

public OnPlayerConnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], string[64+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
 
    format(string, sizeof(string), "[ADMIN] %s has joined the server.", name);
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		SendClientMessage(0xC4C4C4FF, string);
	}
    return 1;
}
Change: PlayerInfo[playerid][pAdmin] to however you save it in your script.
Reply


Messages In This Thread
Send Connect/Left message - by DavidSF - 09.03.2017, 12:51
Re: Send Connect/Left message - by Toroi - 09.03.2017, 14:04
Re: Send Connect/Left message - by Awide - 09.03.2017, 14:30
Re: Send Connect/Left message - by DavidSF - 09.03.2017, 14:38
Re: Send Connect/Left message - by Aerotactics - 09.03.2017, 19:05
Re: Send Connect/Left message - by oSAINTo - 10.03.2017, 04:34

Forum Jump:


Users browsing this thread: 1 Guest(s)