How to avoid? Or is that a bug?
#1

When I do:
Код:
/rcon reloadfs adminx
The script reloadfs normally. But when a player disconects, a message doesn't shows up. Also their status don't save. But normally before the reloadfs, shows the msg of disconection and save status. All works normally after this command, except the callback OnPlayerDisconnect. Is that a bug or is there any other way to avoid?
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),SERVER_USER_FILE,n);
    if(dini_Exists(file)) {
    printf("spawn: %d | registrado: %d | logado: %d",dini_Int(file,"Spawnou"),dini_Int(file,"Registrado"),gPlayerLogged[playerid]);
    SavePlayerStats(playerid);
    SoundForAll(1084);
    plantada[playerid]=0;
    detonada[playerid]=1;
    jail[playerid]=0;
    block_pms[playerid]=0;
    mostrou[playerid]=0;
    fix[playerid]=0;
    gPlayerLogged[playerid] = 0;
    pausa[playerid]=0;
    ToggleVClock(0);
    banco[playerid]=0;
    IsInSafe[playerid]=0;
    new string[128];
    format(string,sizeof(string),"Logged: %d | Spawnou: %d | Jail: %d",gPlayerLogged[playerid],PlayerInfo[playerid][Spawnou],PlayerInfo[playerid][Jail]);
    printf(string);
    }
    new nome[30],string[128];
    GetPlayerName(playerid, nome, 30);
    switch(reason)
    {
      case 0: format(string,sizeof(string),"| {00FFA2}%s [ID: %d] {D60AFF}has disconnected {EBFF0A}[Timeout]", nome, playerid);
      case 1: format(string,sizeof(string),"| {00FFA2}%s [ID: %d] {D60AFF}has disconnected {0AFFFF}[Logged out]", nome, playerid);
      case 2: format(string,sizeof(string),"| {00FFA2}%s [ID: %d] {D60AFF}has disconnected {FF0A43}[Kick/Ban]", nome, playerid);
    }
    SendClientMessageToAll(color, string);
    return 1;
}
Reply


Messages In This Thread
public OnPlayerDisconnect problem - by blackwave - 29.12.2010, 20:36
Re: How to avoid? Or is that a bug? - by Jochemd - 29.12.2010, 21:17
Re: How to avoid? Or is that a bug? - by Mauzen - 29.12.2010, 21:42
Re: How to avoid? Or is that a bug? - by blackwave - 29.12.2010, 22:54
Re: How to avoid? Or is that a bug? - by blackwave - 30.12.2010, 12:34

Forum Jump:


Users browsing this thread: 1 Guest(s)