Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerDisconnect(playerid, reason)
- {
- new str[128];
- gActivePlayers[playerid]--;
- numplayers--;
- OnPlayerUpdateEx(playerid);
- }
- TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
- RemoveRoadblock(playerid);
- if ( IsBEJoined [ playerid ] )
- {
- IsBEJoined [ playerid ] = false;
- BigEventPlayers -= 1;
- if ( !BigEventPlayers && BigEventStarted ) BigEventForceStop ( -2 );
- }
- TransferOffer[playerid] = INVALID_PLAYER_ID;
- PlayerRacing[playerid] = 0; InHuntGame[playerid] = 0;
- PlayerInfo[playerid][pAdjustable] = 1; WantedStatics[playerid] = false;
- PlayerInfo[playerid][pInGG] = 0; PlayerInfo[playerid][pInMDM] = 0;
- PlayerPaintballing[playerid] = 0; PlayerPaintballScore[playerid] = 0;
- PlayerInfo[playerid][pInTec9] = 0; PlayerInDmKills[playerid] = 0;
- PlayerInTec9Kills[playerid] = 0; Event7[playerid] = 0;
- if(playerid == HuntedPlayer)
- {
- SendClientMessageToAll(0x0DABFAA9,"{FFFFFF}==================={0DABFA} Hunting Event{FFFFFF} ======================");
- format(str, sizeof(str), "{FFFFFF}[{0DABFA}Hunting Event{FFFFFF}]{00B366} %s{FFFFFF} a iesit de pe server!", PlayerName(playerid));
- SendClientMessageToAll(0x0DABFAA9,str);
- format(str, sizeof(str), "{FFFFFF}[{0DABFA}Hunting Event{FFFFFF}] Un nou event va incepe in{009999} 10-15 minute!");
- SendClientMessageToAll(0x0DABFAA9,str);
- SendClientMessageToAll(0x0DABFAA9,"{0DABFA}==================={0DABFA} Hunting Event{FFFFFF} ======================");
- IsHunted[playerid] = 0;
- HuntedPlayer = INVALID_PLAYER_ID;
- StartHunt = SetTimer("StartNewHuntGame", 720000, 0);
- KillTimer(EndHunt);
- foreach(Player, i)
- {
- InHuntGame[i] = 0;
- }
- }
- if(JoinedGunGame[playerid] > 0)
- {
- if(JoinedGunGame[playerid] == 2)
- {
- if(Echipa2 > 0)
- {
- Echipa2 -= 1;
- }
- }
- else if(JoinedGunGame[playerid] == 1)
- {
- if(Echipa1 > 0)
- {
- Echipa1 -= 1;
- }
- }
- }
- if(playerid == CashboxOwner)
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerPos(playerid, CashboxX, CashboxY, CashboxZ);
- GetPlayerName(playerid, pName, sizeof(pName));
- SendClientMessageToAll(0xFFD700FF, "================[Servieta]==============");
- format(str, 128, "» {FFFF00}%s (ID: %d) {FFD700}a iesit de pe server si a scapat servieta!", pName, playerid);
- SendClientMessageToAll(0xFFD700FF, str);
- SendClientMessageToAll(0xFFD700FF, "» {FFD700}Poti afla locatia servietei tastand {00A9E7}/servieta");
- SendClientMessageToAll(0xFFD700FF, "================[Servieta]==============");
- CashboxPickup = CreatePickup(1210, 3, CashboxX, CashboxY, CashboxZ);
- CashboxOwner = INVALID_PLAYER_ID;
- }
- foreach(Player, i)
- {
- if(TaxiAccepted[i] < 999)
- {
- if(TaxiAccepted[i] == playerid)
- {
- TaxiAccepted[i] = 999;
- //GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
- SendClientMessage(i, COLOR_LIGHTRED, "» Taxi Caller has left the game .");
- TaxiCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- if(PlayerToFind[i] < 999 && FindTime[i] > 0)
- {
- if(PlayerToFind[i] == playerid)
- {
- PlayerToFind[i] = 999;
- //GameTextForPlayer(i, "~w~Tinta~n~~r~A iesit din joc", 5000, 1);
- SendClientMessage(i, COLOR_LIGHTRED, "» Tinta a parasit jocul !");
- FindTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- }
- if(WantedLevel[playerid] >= 1)
- {
- new string[128];
- new wanted = WantedLevel[playerid];
- new sendername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(wanted > 0)
- {
- switch(reason)
- {
- case 0:
- {
- format(string,128, "%s has exit the game and he had %d wanted level. ( Crash )",sendername,wanted);
- }
- case 1:
- {
- format(string,128, "%s has exit the game and he had %d wanted level. ( Quit )",sendername,wanted);
- }
- }
- SendTeamMessage(2, 0x00ACB2AA, string);
- }
- }
- if(PlayerTied[playerid])
- {
- new string[128];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- switch(reason)
- {
- case 0: format(string,128, "Player %s who was tied, has left the server. (Crash)",name);
- case 1: format(string,128, "Player %s who was tied, has left the server. (Quit)",name);
- case 2: format(string,128, "Player %s who was tied, has left the server. (Kicked/Banned)",name);
- }
- SendClientMessage(TiedBy[playerid], COLOR_LIGHTRED, string);
- }
- if(GettingCK[playerid] < 999)
- {
- if(IsPlayerConnected(GettingCK[playerid]))
- {
- SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Your Character Kill has left the server, try again later.");
- OnCK[GettingCK[playerid]] = 999;
- }
- }
- if(TransportDriver[playerid] < 999)
- {
- if(IsPlayerConnected(TransportDriver[playerid]))
- {
- GameTextForPlayer(TransportDriver[playerid], "~w~The client left", 5000, 1);
- new moneys = 0;
- foreach ( Player, i )
- {
- if ( TransportDriver [ i ] == TransportDriver [ playerid ] && i != playerid )
- {
- if ( IsPlayerInVehicle ( i, GetPlayerVehicleID ( TransportDriver [ playerid ] ) ) )
- {
- moneys = 1;
- break;
- }
- }
- }
- if ( !moneys ) TransportTaxi[TransportDriver[playerid]] = 0;
- TransportDriver[playerid] = 999;
- }
- }
- if( TransportTaxi[playerid] )
- {
- TransportTaxi[playerid] = 0;
- foreach ( Player, i )
- {
- if ( TransportDriver [ i ] == playerid )
- {
- TransportDriver[i] = 999;
- GameTextForPlayer(i, "~w~Passenger left", 5000, 1);
- }
- }
- }
- if(GotHit[playerid] > 0)
- {
- if(GetChased[playerid] < 999)
- {
- if(IsPlayerConnected(GetChased[playerid]))
- {
- SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your Hit has left the server.");
- GoChase[GetChased[playerid]] = 999;
- }
- }
- }
- if(PlayerPaintballing[playerid] != 0)
- {
- PaintballPlayers --;
- }
- if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
- {
- KartingPlayers --;
- }
- if(PlayersChannel[playerid] < 999)
- {
- IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
- }
- if(HireCar[playerid] != 299)
- {
- gCarLock[HireCar[playerid]] = 0;
- }
- if (gLastCar[playerid] > 0)
- {
- gLastDriver[gLastCar[playerid]] = 300;
- if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
- {
- gCarLock[gLastCar[playerid]] = 0;
- }
- }
- if(PlayerBoxing[playerid] > 0)
- {
- if(Boxer1 == playerid)
- {
- if(IsPlayerConnected(Boxer2))
- {
- PlayerBoxing[Boxer2] = 0;
- SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer2, 5);
- GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
- }
- }
- else if(Boxer2 == playerid)
- {
- if(IsPlayerConnected(Boxer1))
- {
- PlayerBoxing[Boxer1] = 0;
- SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer1, 5);
- GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
- }
- }
- InRing = 0;
- RoundStarted = 0;
- Boxer1 = 255;
- Boxer2 = 255;
- TBoxer = 255;
- }
- if(TransportDuty[playerid] == 1)
- {
- TaxiDrivers -= 1;
- TransportDuty[playerid] = 0;
- }
- if(PlayerInfo[playerid][pJob] == 11)
- {
- if(JobDuty[playerid] == 1) { Medics -= 1; }
- }
- else if(PlayerInfo[playerid][pJob] == 7)
- {
- if(JobDuty[playerid] == 1) { Mechanics -= 1; }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement