04.03.2017, 00:35
Bueno pues en mi GM cuando te desconectas, se guardan todos los datos por ejemplo si modificas casas, concesionarios o esas cosas de manera IG pero las cuentas no se guardan.
Si me pudierais ayudar lo agradeceria mucho.
Esto lo tengo en: public OnPlayerDisconnect (playerid, reason)
Llegando al final hay una linea que dice: OnPlayerSavedStats(playerid);
Ayuda por favor
Si me pudierais ayudar lo agradeceria mucho.
Esto lo tengo en: public OnPlayerDisconnect (playerid, reason)
Llegando al final hay una linea que dice: OnPlayerSavedStats(playerid);
Ayuda por favor
Код:
new string[128]; switch (reason) { case 0: { format(string, sizeof(string), "%s ha salido del servidor (Ausente).", GetPlayerNameEx(playerid)); ProxDetector(8.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); if(Info[playerid][pEstado] == 2) { Info[playerid][pJailed] = 1; Info[playerid][pJailTime] += 20*60; } if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { for(new d = 0 ; d < MAX_PLAYERVEHICLES; d++) { if(IsPlayerInVehicle(playerid, PlayerVehicleInfo[playerid][d][pvId])) { new Float:x, Float:y, Float:z, Float:angle, vw; vw = GetPlayerVirtualWorld(playerid); GetVehiclePos(PlayerVehicleInfo[playerid][d][pvId], x, y, z); GetVehicleZAngle(PlayerVehicleInfo[playerid][d][pvId], angle); PlayerVehicleInfo[playerid][d][pvPosX] = x; PlayerVehicleInfo[playerid][d][pvPosY] = y; PlayerVehicleInfo[playerid][d][pvPosZ] = z; PlayerVehicleInfo[playerid][d][pvPosAngle] = angle; PlayerVehicleInfo[playerid][d][pvVW] = vw; } } } } case 1: { format(string, sizeof(string), "%s ha salido del servidor (Desconectado).", GetPlayerNameEx(playerid)); ProxDetector(8.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); if(Info[playerid][pEstado] == 2) { Info[playerid][pJailed] = 1; Info[playerid][pJailTime] += 20*60; } } case 2: { format(string, sizeof(string), "%s ha salido del servidor (kickeado/baneado).", GetPlayerNameEx(playerid)); ProxDetector(8.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); } } if(InfoEvento[EventRequest] == playerid) { InfoEvento[EventRequest] = 999; ABroadCast( COLOR_LIGHTBLUE, "{0D56E7}[STAFF] >> {FFFFFF}El jugador que estaba solicitando un evento se ha desconectado/crashed.", 4 ); } if(InfoEvento[EventCreator] == playerid) { InfoEvento[EventCreator] = 999; ABroadCast( COLOR_YELLOW, "{0D56E7}[STAFF] >> {FFFFFF}El jugador que creу el evento se ha desconectado desconectado/crashed.", 4 ); } if(InfoEvento[EventStaff][0] == playerid) { InfoEvento[EventStaff][0] = 999; } else if(InfoEvento[EventStaff][1] == playerid) { InfoEvento[EventStaff][1] = 999; } else if(InfoEvento[EventStaff][2] == playerid) { InfoEvento[EventStaff][2] = 999; } else if(InfoEvento[EventStaff][3] == playerid) { InfoEvento[EventStaff][3] = 999; } else if(InfoEvento[EventStaff][4] == playerid) { InfoEvento[EventStaff][4] = 999; } if(GetPVarInt(playerid, "IsInArena") == 1) { PaintballDisconnect(playerid); Info[playerid][pPos_x] = GetPVarFloat(playerid, "pbOldX"); Info[playerid][pPos_y] = GetPVarFloat(playerid, "pbOldY"); Info[playerid][pPos_z] = GetPVarFloat(playerid, "pbOldZ"); Info[playerid][pInt] = GetPVarInt(playerid, "pbOldInt"); Info[playerid][pVW] = GetPVarInt(playerid, "pbOldVW"); Info[playerid][pHealth] = GetPVarFloat(playerid, "pbOldHealth"); Info[playerid][pArmour] = GetPVarFloat(playerid, "pbOldArmor"); SetHP(playerid,GetPVarFloat(playerid, "pbOldHealth")); SetPlayerArmour(playerid,GetPVarFloat(playerid, "pbOldArmor")); } else if(GetPVarInt(playerid, "EventToken") == 0) { new Float: x, Float: y, Float: z; GetPlayerPos(playerid, x, y, z); Info[playerid][pPos_x] = x; Info[playerid][pPos_y] = y; Info[playerid][pPos_z] = z; GetPlayerFacingAngle(playerid, Info[playerid][pPos_r]); Info[playerid][pInt] = GetPlayerInterior(playerid); Info[playerid][pVW] = GetPlayerVirtualWorld(playerid); Info[playerid][pChar] = GetPlayerSkin(playerid); if(Info[playerid][pChar] == 0) Info[playerid][pChar] = 299; } else if(GetPVarInt(playerid, "EventToken") == 1) { Info[playerid][pInt] = EventLastInt[playerid]; Info[playerid][pVW] = EventLastVW[playerid]; Info[playerid][pChar] = Info[playerid][pChar]; Info[playerid][pPos_r] = EventFloats[playerid][0]; Info[playerid][pPos_x] = EventFloats[playerid][1]; Info[playerid][pPos_y] = EventFloats[playerid][2]; Info[playerid][pPos_z] = EventFloats[playerid][3]; } else if(ShowRules[playerid] == 1) { Info[playerid][pVW] = GetPVarInt(playerid, "rOldVW"); Info[playerid][pInt] = GetPVarInt(playerid, "rOldInt"); Info[playerid][pPos_x] = GetPVarFloat(playerid, "rOldX"); Info[playerid][pPos_y] = GetPVarFloat(playerid, "rOldY"); Info[playerid][pPos_z] = GetPVarFloat(playerid, "rOldZ"); } if(Spectate[playerid] < 553) { Info[playerid][pInt] = GetPVarInt(playerid, "SpecInt"); Info[playerid][pVW] = GetPVarInt(playerid, "SpecVW"); Info[playerid][pPos_x] = GetPVarFloat(playerid, "SpecPosX"); Info[playerid][pPos_y] = GetPVarFloat(playerid, "SpecPosY"); Info[playerid][pPos_z] = GetPVarFloat(playerid, "SpecPosZ"); GettingSpectated[Spectate[playerid]] = 999; Spectate[playerid] = 999; } if(Info[playerid][pAdverID] != -1) ClearAd(Info[playerid][pAdverID]); if(HireKey[playerid] != 9999) { SetVehicleToRespawn(HireKey[playerid]); } if(Interview != 0) { if(strcmp(Interviewer,plname,true) == 0 ) { SendClientMessageEx(playerid, COLOR_WHITE, "ЎSe cancelу tu entrevista!"); Interviewer = "Nadie"; Interview = 0; } } OnPlayerSavedStats(playerid); UnloadPlayerVehicles(playerid); ResetPlayerWeapons(playerid); for(new i = 0; i < MAX_REPORTS; i++) { if(Reports[i][ReportFrom] == playerid) { Reports[i][ReportFrom] = 999; Reports[i][BeingUsed] = 0; Reports[i][TimeToExpire] = 0; } } foreach(Player, i) { if(TaxiAccepted[i] == playerid) { TaxiAccepted[i] = 999; GameTextForPlayer(i, "~w~Jugador~n~~r~se desconectу", 5000, 1); TaxiCallTime[i] = 0; DisablePlayerCheckpoint(i); } if(EMSAccepted[i] == playerid) { EMSAccepted[i] = 999; GameTextForPlayer(i, "~w~Jugador~n~~r~se desconectу", 5000, 1); EMSCallTime[i] = 0; DisablePlayerCheckpoint(i); } if(MedicAccepted[i] == playerid) { TaxiAccepted[playerid] = 999; MedicAccepted[playerid] = 999; GameTextForPlayer(i, "~w~Jugador~n~~r~se desconectу", 5000, 1); MedicCallTime[i] = 0; DisablePlayerCheckpoint(i); } } if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999) { if(IsPlayerConnected(TransportDriver[playerid])) { TransportMoney[TransportDriver[playerid]] += TransportCost[playerid]; TransportTime[TransportDriver[playerid]] = 0; TransportCost[TransportDriver[playerid]] = 0; format(string, sizeof(string), "~w~Pasajero se fue~n~~g~ganaste $%d",TransportCost[playerid]); GameTextForPlayer(TransportDriver[playerid], string, 5000, 1); TransportDriver[playerid] = 999; } } if(GotHit[playerid] > 0) { if(GetChased[playerid] < 999) { if(IsPlayerConnected(GetChased[playerid])) { SendClientMessageEx(GetChased[playerid], COLOR_YELLOW, "Tu hit saliу del servidor."); GoChase[GetChased[playerid]] = 999; } } } if(GoChase[playerid] < 999){ GetChased[GoChase[playerid]] = 999; GotHit[GoChase[playerid]] = 999; } if(GetPVarInt(playerid, "AdvisorDuty") == 1) { Advisors--; } if(Team_Mecanicos(playerid)) { if(OnDuty[playerid] == 1) { Mechanics -= 1; } } if(TransportDuty[playerid] == 1) { TaxiDrivers -= 1; } return 1; }