11.07.2011, 19:16
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new string[64], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name); // Gets the playername and stores it in name
switch(reason)
{
case 0: format(string,sizeof string," ** %s left the server. Reason: Timed out",name); // ** Wesley221 left the server. Reason: Timed out
case 1: format(string,sizeof string," ** %s left the server. Reason: Leaving",name); // ** Wesley221 left the server. Reason: Leaving
case 2: format(string,sizeof string," ** %s left the server. Reason: Kicked/Banned",name); // ** Wesley221 left the server. Reason: Kicked/Banned
}
SendClientMessageToAll(ENTERYOURCOLOURHERE,string);
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
new name[24], string[64];
GetPlayerName(playerid, name, sizeof name);
format(string, sizeof string, " ** %s just joined the game!", name);
SendClientMessage(playerid, COLOR_BLUE, string);
return 1;
}