[Ajuda] Problema com OnPlayerDisconnect
#1

Код:
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 ¬¬
Reply
#2

Tem mais coisa antes?
Reply
#3

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);
Reply
#4

Tenta colocar o switch no inicio do OnPlayerDisconnect
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)