Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDisconnect(playerid, reason)
- {
- if(PlayerInfo[playerid][pLogged] == true)
- {
- if(GetPVarInt(playerid, "P_CUFFED") > 0)
- {
- ResetWeapons(playerid);
- DeletePVar(playerid, "P_CUFFED");
- PlayerInfo[playerid][pArrests]++;
- PlayerInfo[playerid][pWanted] = 0;
- PlayerInfo[playerid][pJailTime] = 60 * 60;
- PlayerInfo[playerid][pJail] = 1;
- }
- if(GetPlayerCar(playerid) == true)
- {
- new i = GetPVarInt(playerid, "PLAYER_CAR");
- if(i != INVALID_VEHICLE_ID)
- {
- if(reason == 0 || reason == 2)
- {
- VehicleInfo[i][vLock] = 1;
- UpdateHouseCar(i);
- }
- else SaveHouseCar(i);
- }
- }
- for(new i = 0; i < 5; i++)
- {
- if(Broadcast[PlayerInfo[playerid][pRadio]][0] == true)
- {
- if(PlayerInChannel[PlayerInfo[playerid][pRadio]][i] == INVALID_PLAYER_ID) continue;
- else if(PlayerInChannel[PlayerInfo[playerid][pRadio]][i] == playerid)
- {
- PlayerInChannel[PlayerInfo[playerid][pRadio]][i] = INVALID_PLAYER_ID;
- format(var, 54, "[Эфир] %s покинул(а) радиоэфир.", GetName(playerid));
- SendFMes(F_NEWS, 0x597d8bFF, var);
- break;
- }
- }
- }
- PlayerInfo[playerid][pOnlineTime] += (NetStats_GetConnectedTime(playerid) / 1000);
- PlayerInfo[playerid][pLogged] = false;
- SaveAccount(playerid);
- }
- KillTimer(PlayerInfo[playerid][PlayerSecTimer]);
- for(new i = 0; i < 21; ++i) PlayerTextDrawDestroy(playerid, Speed[playerid][i]);
- for(new i = 0; i < 6; i++) PlayerTextDrawDestroy(playerid, Capture[playerid][i]);
- for(new i = 0; i < 16; i++) PlayerTextDrawDestroy(playerid, CarShop[playerid][i]);
- for(new i = 0; i < 18; i++) PlayerTextDrawDestroy(playerid, Filling[playerid][i]);
- for(new i = 1; i <= TOTALGZ; i++) GangZoneHideForPlayer(playerid, GZInfo[i][gzID]);
- if(PlantObject[playerid] != -1) // есть
- {
- DestroyObject(PlantObject[playerid]);
- PlantObject[playerid] = -1;
- }
- injob[playerid] = 0; // есть
- bag[playerid] = 0; // есть
- pCheckpoint[playerid] = 0; // есть
- cexjob[playerid] = 0; // есть
- Workpiece[playerid] = 0; // есть
- pKeyJob[playerid] = 0; // есть
- pKeys[playerid] = 0; // есть
- pKeyTime[playerid] = 0; // есть
- pProverka[playerid] = 0; // есть
- pTimeJob[playerid] = 0;
- pGPS[playerid] = 0; // есть
- pNewJob[playerid] = 0;
- newjob[playerid] = 0;
- WorkCar[playerid] = 0;
- DestroyVehicle(carjob[playerid]);
- carjob[playerid] = -1;
- pDeath[playerid] = 0;
- CheckCountGames[playerid] = 0;
- TextDrawHideForPlayer(playerid, Logo[0]);
- TextDrawHideForPlayer(playerid, Logo[1]);
- TextDrawHideForPlayer(playerid, Logo[2]);
- if(PlayerInfo[playerid][pSend][4] == 1)
- {
- TextDrawHideForPlayer(playerid, hunger_TD[0]);
- TextDrawHideForPlayer(playerid, hunger_TD[1]);
- PlayerTextDrawHide(playerid, hunger_PTD[playerid][0]);
- PlayerTextDrawHide(playerid, hunger_PTD[playerid][1]);
- }
- TextDrawHideForPlayer(playerid, games_TD[0]);
- TextDrawHideForPlayer(playerid, games_TD[1]);
- TextDrawHideForPlayer(playerid, games_TD[2]);
- TextDrawHideForPlayer(playerid, games_TD[3]);
- TextDrawHideForPlayer(playerid, games_TD[4]);
- TextDrawHideForPlayer(playerid, games_TD[5]);
- PlayerTextDrawHide(playerid, games_PTD[playerid]);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement