Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 1.17 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public OnPlayerDisconnect(playerid, reason)
  2. {
  3.         new leaveMsg1[256];
  4.         IsPlayerMuted[playerid] = 0;
  5.         format(leaveMsg1, 256, "2** 4[%i]2 %s has left the server. (%s)", playerid, PlayerName(playerid), aDisconnectNames[reason]);
  6.         IRC_GroupSay(GroupID[0], EchoChan, leaveMsg1);
  7.         IsPlayerJailed[playerid] = false;
  8.         IsPlayerMuted[playerid] = false;
  9.         if(strlen(AdminChan) != 0)
  10.         {
  11.             if(IsPlayerNPC(playerid))
  12.             {
  13.                 new leaveMsg2[256];
  14.                 format(leaveMsg2, 256, "2** 4[NPC] [%i]2 %s has left the server. (%s)", playerid, PlayerName(playerid), aDisconnectNames[reason]);
  15.                 IRC_GroupSay(GroupID[1], AdminChan, leaveMsg2);
  16.                 }
  17.                 else
  18.                 {
  19.                 new leaveMsg2[256];
  20.                 new current = Now() - TimeAtConnect[playerid];
  21.                 format(leaveMsg2, 256, "2** 4[%i]2 %s has left the server. (%s) (%s)", playerid, PlayerName(playerid), aDisconnectNames[reason], ConvertTime(current));
  22.                 IRC_GroupSay(GroupID[1], AdminChan, leaveMsg2);
  23.                 }
  24.         }
  25.         return true;
  26. }