08.04.2013, 02:23
Код:
public OnPlayerDisconnect(playerid, reason) { if(!IsPlayerNPC(playerid)){ } else { return 1; } SetPlayerColor(playerid,0xFFFFFFAA); if(kick[playerid] == 0){ } TextDrawDestroy(Brasil); TextDrawHideForPlayer(playerid, tutorial); TextDrawHideForPlayer(playerid, tutorial2); TextDrawHideForPlayer(playerid, tutorial3); TextDrawHideForPlayer(playerid, tutorial4); TextDrawHideForPlayer(playerid, tutorial5); TextDrawDestroy(Textdraw2[playerid]); dini_IntSet(file, "novato", 2); new aname[MAX_PLAYER_NAME]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); dini_IntSet(file, "Admin", pAdmin[playerid]); new Pname[MAX_PLAYER_NAME]; new string[256]; GetPlayerName(playerid, Pname, sizeof(Pname)); switch(reason) { case 0: format(string,sizeof string,"{FF0000}•••{FFFFFF} %s (%d) saiu do server {FFFF80}[{FFFFFF} Problemas com a conexгo {FFFF80}]{FFFFFF}",Pname, playerid); case 1: format(string,sizeof string,"{FF0000}•••{FFFFFF} %s (%d) saiu do server {FFFF80}[{FFFFFF} Resolveu sair {FFFF80}]{FFFFFF}",Pname, playerid); case 2: format(string,sizeof string,"{FF0000}•••{FFFFFF} %s (%d) saiu do server {FFFF80}[{FFFFFF} Kickado / Banido {FFFF80}]{FFFFFF}",Pname, playerid); } Mute[playerid] = 0; SendClientMessageToAll(0xA6A6A6AA, string); //Anti-BOT switch(reason) { case 0: format(string, sizeof(string), "{FF0000}•••{FFFFFF} %s (%d) saiu do server {FFFF80}[{FFFFFF} Problemas com a conexгo {FFFF80}]{FFFFFF}.", Pname,playerid); case 1: format(string, sizeof(string), "{FF0000}•••{FFFFFF} %s (%d) saiu do server {FFFF80}[{FFFFFF} Resolveu sair {FFFF80}]{FFFFFF}.", Pname,playerid); case 2: format(string, sizeof(string), "{FF0000}•••{FFFFFF} %s (%d) saiu do server {FFFF80}[{FFFFFF} Kickado / Banido {FFFF80}]{FFFFFF}.", Pname,playerid); } MsgLog(string); new Interior; Interior = GetPlayerInterior(playerid); new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); CPSERVICE_actualcp[playerid] = 0; new grana; grana = GetPlayerGrana(playerid); dini_IntSet(file, "Dinheiro", grana); dini_IntSet(file,"Continuar",1); dini_IntSet(file,"continuarte",1); dini_FloatSet(file,"ContinuarX",Float:X); dini_FloatSet(file,"ContinuarY",Float:Y); dini_FloatSet(file,"ContinuarZ",Float:Z); dini_IntSet(file,"ContinuarI",Interior); dini_IntSet(file, "convitent", 0); dini_IntSet(file, "Entrevista", 0); dini_IntSet(file,"aAdmin",0); dini_IntSet(filena(playerid),"Procurado", GetProcurado(playerid)); if(pAdmin[playerid] == 3 || pAdmin[playerid] == 4) { new AdminName[MAX_PLAYER_NAME]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(string, sizeof(string), "", AdminName); for(new i=0; i<MAX_PLAYERS; i++) { GameTextForPlayer(i, string , 5000, 1); } } if(InCall[playerid]==1) { if(playerid==sender[playerid]) { InCall[gc]=0,GetCall[gc]=0; InCall[sender[playerid]]=0,GetCall[sender[playerid]]=0; SetPlayerSpecialAction(gc,SPECIAL_ACTION_STOPUSECELLPHONE); format(str3,128,"%s desligou o celular!",GetName(sender[playerid])); SendClientMessage(gc,GRAY,str3); } else if(playerid == gc) { InCall[gc]=0,GetCall[gc]=0; InCall[sender[playerid]]=0,GetCall[sender[playerid]]=0; SetPlayerSpecialAction(sender[playerid],SPECIAL_ACTION_STOPUSECELLPHONE); format(str3,128,"%s estб fora de area por sair da Cidade!",GetName(gc)); SendClientMessage(sender[playerid],GRAY,str3); } } minutosii[playerid] = 0; Conversa[playerid] = 0; //NaFaculdade[playerid] = 0; return 1; }