SA-MP Forums Archive
[Ajuda] Problema com OnPlayerDisconnect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problema com OnPlayerDisconnect (/showthread.php?tid=297612)



[Ajuda] Problema com OnPlayerDisconnect - cotonete - 16.11.2011

Код:
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 
	switch(reason)
	{
	    case 0: format(string, sizeof(string)," [SERVIDOR] \"%s\" (%d) perdeu a conexгo.", name, playerid);
	    case 1: format(string, sizeof(string)," [SERVIDOR] \"%s\" (%d) saiu do servidor.", name, playerid);
//	    case 2: format(string, sizeof(string)," [SERVIDOR] \"%s\" (%d) foi expulso do servidor.", name,playerid);
	}
	SendClientMessageToAll(COLOR_CONNECTION, string);
	SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
porque isso nгo funciona? nгo faz nada ¬¬


Re: [Ajuda] Problema com OnPlayerDisconnect - ViniBorn - 16.11.2011

Tem mais coisa antes?


Re: [Ajuda] Problema com OnPlayerDisconnect - cotonete - 16.11.2011

tem isso:

Код:
	if(!strcmp("Toba", pNome(playerid), true))
	{
	    return 0;
	}
	Delete3DTextLabel(Recompensa[playerid]);
    KillTimer(SkinClass[playerid][SpawnTimer] );
    PlayerProps[playerid] = 0;
    EarningsForPlayer[playerid] = 0;
    new string[128], name[MAX_PLAYER_NAME];
   	GetPlayerName(playerid, name, MAX_PLAYER_NAME);

    SavePlayer(playerid);



Re: [Ajuda] Problema com OnPlayerDisconnect - ViniBorn - 16.11.2011

Tenta colocar o switch no inicio do OnPlayerDisconnect


Re: [Ajuda] Problema com OnPlayerDisconnect - TopFuel - 16.11.2011

Quote:
Originally Posted by cotonete
Посмотреть сообщение
tem isso:

Код:
	if(!strcmp("Toba", pNome(playerid), true))
	{
	    return 0;
	}
	Delete3DTextLabel(Recompensa[playerid]);
    KillTimer(SkinClass[playerid][SpawnTimer] );
    PlayerProps[playerid] = 0;
    EarningsForPlayer[playerid] = 0;
    new string[128], name[MAX_PLAYER_NAME];
   	GetPlayerName(playerid, name, MAX_PLAYER_NAME);

    SavePlayer(playerid);
da uma olhada se a public ta com o reason:
pawn Код:
public OnPlayerDisconnect(playerid,reason)
caso estiver manda a sua OnPlayerDisconnect toda