All pastes #585689 Raw Edit

Teh Connectionx

public text v1 · immutable
·published 2007-06-23 11:51 UTC
rendered paste body
//Norek's ass wipe of a script
#define grey 0xC0C0C0AA



public OnPlayerConnect(playerid)
{
     SendDeathMessage(playerid, INVALID_PLAYER_ID, 200);
     new string[256];
     GetPlayerName(playerid,PlayerName,24);
     format(string,256,"*** %s has joined the server.",PlayerName);
     SendClientMessageToAll(grey,string);
     print(string);
   return 1;
}

public OnPlayerDisconnect(playerid,reason)
{
     new Reason[256],string[256],name[24];
     GetPlayerName(playerid,name,24);
     switch(reason) { case 0: Reason = "Timed Out"; case 1: Reason = "Leaving"; case 2: Reason = "Ejected"; }
     format(string,256,"*** %s has left the server. (%s)",name,Reason);
     SendClientMessageToAll(grey,string);
     print(string);
     SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
Return 1;
}

DEATH MESSAGES CAN BE REMOVED. USED TO SHOW CONNECTION IN DEATH LIST