[Ajuda] Player sai do servidor, servidor dб close.
#1

Boas pessoal gostava de saber sempre que um player sai do server, o server dб close the connection?

Tб ai um print:

http://i.imgur.com/3XOzwFZ.jpg?1

Obrigado desde jб.
Reply
#2

Quote:
Originally Posted by MorreJaa
Посмотреть сообщение
Boas pessoal gostava de saber sempre que um player sai do server, o server dб close the connection?

Tб ai um print:

http://i.imgur.com/3XOzwFZ.jpg?1

Obrigado desde jб.
Й alguma coisa no OnPlayerDisconnect. Poste a public OnPlayerDisconnect!
Reply
#3

Код:
public OnPlayerDisconnect(playerid, reason)
{
    for(new i; i<MAX_VEHICLES; i++)
	{
		DestroyObject(gIndicator1[playerid][i]);
		DestroyObject(gIndicator2[playerid][i]);
		DestroyObject(gIndicator3[playerid][i]);
		DestroyObject(gIndicator4[playerid][i]);
	}
	if(IsPlayerNPC(playerid))
	{
		Delete3DTextLabel(label[playerid]);
		return 1;
    }
    new unique=PlayerInfo[playerid][UniqueID];
	KillTimer(Timer2);
	KillTimer(Timer3);
	KillTimer(Timer4[playerid]);
	KillTimer(Timer5);
    KillTimer(Curar1[playerid]);
    KillTimer(Curar2[playerid]);
	KillTimer(Curar3[playerid]);
	TextDrawHideForPlayer(playerid,Textdraw1);
	TextDrawHideForPlayer(playerid,Textdraw0);
	new string[128];
	OnPlayerDataSave(playerid);
    if(reason == 0)
	{
    	if(gPlayerLogged[playerid])
		{
			KillTimer(TimerLolada);
			PlayerLocalMessage(playerid,15.0,"acabou de crashar/cair do servidor.");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				TextDrawHideForPlayer(i, TextdrawInfo[i]); //Wait
				format(string, sizeof(string), "O Jogador %s (ID:%d) crashou do servidor.", GetPlayerNameEx(playerid),playerid);
				TextDrawSetString(TextdrawInfo[i],string);
				TextDrawColor(TextdrawInfo[i], 0xFFC66361);
				TextDrawShowForPlayer(i, TextdrawInfo[i]);
			}
			TimerLolada = SetTimer("EntrouSai", 8000, 0);
			SalvarPlayerStatus(unique, 0);
	    }
	}
   	else if(reason == 1)
   	{
   	    KillTimer(TimerLolada);
   	    for(new i = 0; i < MAX_PLAYERS; i++)
   	    {
	   	    TextDrawHideForPlayer(i, TextdrawInfo[i]);
			format(string, sizeof(string), "O Jogador %s (ID:%d) abandonou o servidor.", GetPlayerNameEx(playerid),playerid);
			TextDrawSetString(TextdrawInfo[i],string);
			TextDrawColor(TextdrawInfo[i], 0xFF000061);
			TextDrawShowForPlayer(i, TextdrawInfo[i]);
		}
		TimerLolada = SetTimer("EntrouSai", 8000, 0);
		SalvarPlayerStatus(unique, 0);
		return 1;
  	}
  	new Float:x,Float:y,Float:z;
   	GetPlayerPos(playerid,x,y,z);
    PlayerInfo[playerid][CrashX] = x;
	PlayerInfo[playerid][CrashY] = y;
	PlayerInfo[playerid][CrashZ] = z;
	PlayerInfo[playerid][CrashInt] = GetPlayerInterior(playerid);
	PlayerInfo[playerid][CrashW] = GetPlayerVirtualWorld(playerid);
	PlayerInfo[playerid][Crashed] = 1;
	OnPlayerDataSave(playerid);
	SairDeDuty(playerid);
	SalvarPlayerStatus(unique, 0);
	UniquePlayerLogged[unique]=0;
	LoggedID[unique]=-1;
	KillTimer(verificartimer[playerid]);
	return 1;
}
Reply
#4

Pode estar falando pastas/arquivos de salvamentos na scriptfiles ..
Reply
#5

E como posso verificar isso?
Reply
#6

Sorry dubble post, alguem ajuda? Urgente :S

Quem quiser ver o server como tб que diga aqui eu mostro, tб muito bom apenas tem esse problema :c
Reply
#7

Manda esse seu "SalvarPlayerStatus"
Reply
#8

Poste sua OnPlayerConnect
Reply


Forum Jump:


Users browsing this thread: