Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ONPLAYERDISCONNECT
- public OnPlayerDisconnect(playerid, reason)
- {
- new wakaname[MAX_PLAYER_NAME];
- PlayerInfo[playerid][pStatus] = 0;
- new qqerry[128];
- GetPlayerName(playerid,wakaname,sizeof(wakaname));
- format(qqerry, sizeof(qqerry), "UPDATE `users` SET `Status` = '0' WHERE `name` = '%s'", wakaname);
- mysql_query(SQL,qqerry);
- TextDrawHideForPlayer(playerid, TextdrawConnect19);
- // PAYDAY SAVE
- if(PlayerInfo[playerid][pWantedLevel] >= 1)
- {
- new price = PlayerInfo[playerid][pWantedLevel] * 1000;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsACop(i) && CrimInRange(30.0, playerid,i))
- {
- new string[512];
- new sendername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- PlayerInfo[playerid][pJailed] = 1;
- PlayerInfo[playerid][pJailTime] = (PlayerInfo[playerid][pWantedLevel])*(150);
- format(string, sizeof(string), "Dispecer: %s a intrat in jail [%d puncte wanted] deoarece a folosit comanda /quit in perimetrul unui politist!", sendername, PlayerInfo[playerid][pWantedLevel]);
- SendRadioMessage(1, TEAM_BLUE_COLOR, string);
- SendRadioMessage(2, TEAM_BLUE_COLOR, string);
- SendRadioMessage(3, TEAM_BLUE_COLOR, string);
- format(string, sizeof(string), "Jucatorul %s a intrat in jail (posibil /quit cu wanted) si ai primit %s$!", sendername, FormatNumber(price));
- SCM(i, COLOR_WHITE, string);
- GivePlayerCash(i, price);
- GivePlayerCash(playerid, -price);
- WantedPoints[playerid] = 0;
- PlayerInfo[playerid][pWantedLevel] = 0;
- SetPlayerWantedLevel(playerid, 0);
- Update(playerid,pWantedLevelx);
- Update(playerid,pJailedx);
- Update(playerid,pJailTimex);
- Update(i, pCashx);
- Update(playerid, pCashx);
- }
- }
- }
- if(JoinedDeathMatch[playerid] > 0)
- {
- if(JoinedDeathMatch[playerid] == 2)
- {
- if(Echipa2 > 0)
- {
- Echipa2 -= 1;
- }
- }
- else if(JoinedDeathMatch[playerid] == 1)
- {
- if(Echipa1 > 0)
- {
- Echipa1 -= 1;
- }
- }
- }
- if(gPlayerLogged[playerid] != 0)
- {
- OnPlayerDateUpdateX2(playerid);
- Update(playerid, pPayDayHadx);
- Update(playerid, pPayDayx);
- Update(playerid, pPayCheckx);
- Update(playerid, pFpunishx);
- Update(playerid, pConnectTimex);
- Update(playerid, pLawyerx);
- Update(playerid, pTowx);
- Update(playerid, pBank);
- Update(playerid, pCashx);
- Update(playerid, pRP);
- Update(playerid, pJailTimex);
- Update(playerid, pLevelx);
- }
- if(PlayerInfo[playerid][pMember] != 0)
- {
- new namex[25],disc[84];
- GetPlayerName(playerid,namex,sizeof(namex));
- switch(reason)
- {
- case 0: format(disc,sizeof(disc),"{A9C4E4}Membrul factiunii %s a parasit serverul (Crash).",namex);
- case 1: format(disc,sizeof(disc),"{A9C4E4}Membrul factiunii %s a parasit serverul (/q).",namex);
- case 2: format(disc,sizeof(disc),"{A9C4E4}Membrul factiunii %s a parasit serverul (Kicked/Banned).",namex);
- }
- SendLeaderMessage(PlayerInfo[playerid][pMember], COLOR_YELLOW, disc);
- }
- GetPlayerName(playerid,wakaname,sizeof(wakaname));
- PlayerInfo[playerid][pStatus] = 0;
- format(qqerry, sizeof(qqerry), "UPDATE `users` SET `Status` = '0' WHERE `name` = '%s'", wakaname);
- mysql_query(SQL,qqerry);
- if(personalcar[playerid] != 0)
- {
- if(CarInfo[OwnedVeh(personalcar[playerid])][cNeon] != 0)
- {
- DestroyObject(Neon1[personalcar[playerid]]);
- DestroyObject(Neon2[personalcar[playerid]]);
- Neon1[personalcar[playerid]] = 0;
- Neon2[personalcar[playerid]] = 0;
- }
- vehEngine[personalcar[playerid]] = 0;
- DestroyVehicle(personalcar[playerid]);
- OwnedVeh(personalcar[playerid]) = 0;
- personalcar[playerid] = 0;
- }
- PlayerInfo[playerid][pFishes] = 0;
- Update(playerid, pFishesx);
- tazer[playerid] = 0; curatj[playerid] = 0;
- playerdeath[playerid] = 0; biztype[playerid] = 0;
- bizid[playerid] = 0; bizprice[playerid] = 0;
- bizoffer[playerid] = 999; PlayerInfo[playerid][pSleeping] = 0;
- licenseaccepted[playerid] = -1; licensesend[playerid] = -1;
- SellgunOffer[playerid] = -1; SellgunPrice[playerid] = 0;
- SellgunMats[playerid] = 0; SellgunAmmo[playerid] = 0;
- SellgunID[playerid] = 0; Line1busck[playerid] = 0;
- Line2busck[playerid] = 0; pizzaj[playerid] = 0;
- prodck[playerid] = 0; mowerc[playerid] = 0;
- mowermoney[playerid] = 0; PlayerPaintballing[playerid] = 0;
- PlayerPaintballScore[playerid] = 0; transports[playerid] = 0;
- transports2[playerid] = 0; transportsi[playerid] = 0;
- transportjmecher[playerid] = 0;
- timert[playerid] = 0; petrolt[playerid] = 0;
- petrolt2[playerid] = 0; woodman[playerid] = 0;
- woodl[playerid] = 0; togfind[playerid] = 0;
- PlayerCuffed2[playerid] = 0; OwnableCarOffer[playerid] = 999;
- OwnableCarID[playerid] = 0; OwnableCarPrice[playerid] = 0;
- togip[playerid] = 0; Clanidoff[playerid] = 999;
- WTToggle[playerid] = false; WTChannel[playerid] = 0.0;
- antirem[playerid] = 0; radiop[playerid] = 0;
- Radaron[playerid] = 0; Radarlimit[playerid] = 0;
- balem[playerid] = 0; wantedlost[playerid] = 1800;
- personalcar[playerid] = 0; Diceid[playerid] = 999;
- Dicem[playerid] = 999; pingsound[playerid] = 1;
- TaxiCall[playerid] = -1; Refueling[playerid] = 0;
- InHQ[playerid] = -1; InHouse[playerid] = -1;
- InBussines[playerid] = -1; raceoff[playerid] = 999;
- toglc[playerid] = 0; explosion[playerid] = 0;
- fight[playerid] = 999; motooff[playerid] = 999;
- taxim[playerid] = 0;
- fightr[playerid] = 0;
- fightn[playerid] = 999; fightrn[playerid] = 0;
- TextDrawHideForPlayer(playerid, TimeLeftWar1[playerid]);
- TextDrawHideForPlayer(playerid, SafeZone[playerid]);
- RemovePlayerAttachedObject(playerid,0);
- RemovePlayerAttachedObject(playerid,1);
- RemovePlayerAttachedObject(playerid,2);
- RemovePlayerAttachedObject(playerid,3);
- RemovePlayerAttachedObject(playerid,4);
- if(startrace == 1 && playerrace[playerid] != 0)
- {
- playerrace[playerid] = 0;
- foreach(Player,i)
- {
- if(playerrace[i] != 0)
- {
- playerrace[i] = 0;
- SetPlayerPos(i, SBizzInfo[23][sbEntranceX],SBizzInfo[23][sbEntranceY],SBizzInfo[23][sbEntranceZ]);
- SetPlayerInterior(i, 0);
- DisablePlayerCheckpoint(i);
- }
- }
- startrace=0;
- racewinner=999;
- SetVehicleToRespawn(hotc[1]);
- SetVehicleToRespawn(hotc[2]);
- Gas[hotc[1]] = GasMax;
- Gas[hotc[1]] = GasMax;
- }
- if(startsrace == 1 && playerraces[playerid] != 0)
- {
- playerraces[playerid] = 0;
- foreach(Player,i)
- {
- if(playerraces[i] != 0)
- {
- playerraces[i] = 0;
- SetPlayerPos(i, SBizzInfo[25][sbEntranceX],SBizzInfo[25][sbEntranceY],SBizzInfo[25][sbEntranceZ]);
- SetPlayerInterior(i, 0);
- DisablePlayerCheckpoint(i);
- }
- }
- startsrace=0;
- raceswinner=999;
- SetVehicleToRespawn(sanr[1]);
- SetVehicleToRespawn(sanr[2]);
- Gas[sanr[1]] = GasMax;
- Gas[sanr[1]] = GasMax;
- }
- if(fight2[playerid] != 999)
- {
- new string[100];
- SetPlayerVirtualWorld(fight2[playerid],0);
- fight2[fight2[playerid]] = 999;
- GivePlayerCash(fight2[playerid],2000);
- Update(fight2[playerid],pCashx);
- SCM(fight2[playerid],COLOR_LIGHTBLUE,"You won the fight and received $2,000.");
- new randomrp = random(6);
- if(randomrp == 5)
- {
- PlayerInfo[fight2[playerid]][pExp] += 1;
- Update(fight2[playerid],pRP);
- SCM(fight2[playerid],COLOR_LIGHTBLUE,"Ai primit 1 respect points (RP) pentru ca ai castigat cursa.");
- }
- new fightname[25];
- GetPlayerName(fight2[playerid],fightname,sizeof(fightname));
- foreach(Player,i)
- {
- if(IsPlayerInRangeOfPoint(i,15.0,1510.2313,-1058.1528,25.0625))
- {
- format(string,sizeof(string),"** %s won the fight.",fightname);
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- if(PlayerInfo[fight2[playerid]][pChar] > 0)
- {
- SetPlayerSkin(fight2[playerid], PlayerInfo[fight2[playerid]][pChar]);
- }
- else
- {
- SetPlayerSkin(fight2[playerid], PlayerInfo[fight2[playerid]][pModel]);
- }
- TogglePlayerControllable(fight2[playerid], 1);
- SetPlayerPos(fight2[playerid],1510.46,-1059.55,25.0625);
- fight2[playerid] = 999;
- fighta = 0;
- }
- if(fight2n[playerid] != 999)
- {
- new string[100];
- SetPlayerVirtualWorld(fight2n[playerid],0);
- fight2n[fight2n[playerid]] = 999;
- GivePlayerCash(fight2n[playerid],2000);
- Update(fight2n[playerid],pCashx);
- SCM(fight2n[playerid],COLOR_LIGHTBLUE,"You won the fight and received $2,000.");
- new randomrp = random(6);
- if(randomrp == 5)
- {
- PlayerInfo[fight2n[playerid]][pExp] += 1;
- Update(fight2n[playerid],pRP);
- SCM(fight2n[playerid],COLOR_LIGHTBLUE,"Ai primit 1 respect points (RP) pentru ca ai castigat cursa.");
- }
- new fightname[25];
- GetPlayerName(fight2n[playerid],fightname,sizeof(fightname));
- foreach(Player,i)
- {
- if(IsPlayerInRangeOfPoint(i,15.0,1328.1801,-1558.2500,13.5469))
- {
- format(string,sizeof(string),"** %s won the ninja fight.",fightname);
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- ResetPlayerWeaponsEx(fight2n[playerid]);
- ResetPlayerWeapons(fight2n[playerid]);
- if(PlayerInfo[fight2n[playerid]][pChar] > 0)
- {
- SetPlayerSkin(fight2n[playerid], PlayerInfo[fight2n[playerid]][pChar]);
- }
- else
- {
- SetPlayerSkin(fight2n[playerid], PlayerInfo[fight2n[playerid]][pModel]);
- }
- TogglePlayerControllable(fight2n[playerid], 1);
- SetPlayerPos(fight2n[playerid],1328.1801,-1558.2500,13.5469);
- fight2n[playerid] = 999;
- fightnin = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment