Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SetPlayerUnjail()
- {
- new string[128];
- for(new i = 0; i<MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][Robbing] == 1 && PlayerInfo[i][CashLoading] != 0)
- {
- PlayerInfo[i][CashLoading] -= 1;
- if(PlayerInfo[i][CashLoading] == 0)
- {
- PlayerInfo[i][CashLoaded] += 10000;
- SendClientMessage(i, COLOR_YELLOW, "** You now have an extra $10,000 in your cash bag.");
- if(PlayerInfo[i][CashLoaded] >= 200000)
- {
- PlayerInfo[i][CashLoaded] = 200000;
- SendClientMessage(i, COLOR_YELLOW, "** You can't hold more than $200,000 in the bag.");
- }
- }
- }
- }
- if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
- {
- StartingPaintballRound = 1;
- SetTimer("PreparePaintball", 15000, 0);
- }
- //foreach(Player, i)
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new level = PlayerInfo[i][pLevel];
- if(level >= 0 && level <= 2) { PlayerInfo[i][pPayCheck] += 1; }
- else if(level >= 3 && level <= 4) { PlayerInfo[i][pPayCheck] += 2; }
- else if(level >= 5 && level <= 6) { PlayerInfo[i][pPayCheck] += 3; }
- else if(level >= 7 && level <= 8) { PlayerInfo[i][pPayCheck] += 4; }
- else if(level >= 9 && level <= 10) { PlayerInfo[i][pPayCheck] += 5; }
- else if(level >= 11 && level <= 12) { PlayerInfo[i][pPayCheck] += 6; }
- else if(level >= 13 && level <= 14) { PlayerInfo[i][pPayCheck] += 7; }
- else if(level >= 15 && level <= 16) { PlayerInfo[i][pPayCheck] += 8; }
- else if(level >= 17 && level <= 18) { PlayerInfo[i][pPayCheck] += 9; }
- else if(level >= 19 && level <= 20) { PlayerInfo[i][pPayCheck] += 10; }
- else if(level >= 21) { PlayerInfo[i][pPayCheck] += 11; }
- if(PlayerInfo[i][pJailed] > 0)
- {
- if(PlayerInfo[i][pJailTime] > 0 && WantLawyer[i] == 0)
- {
- PlayerInfo[i][pJailTime]--;
- }
- if(PlayerInfo[i][pJailTime] <= 0 && WantLawyer[i] == 0)
- {
- PlayerInfo[i][pJailTime] = 0;
- if(PlayerInfo[i][pJailed] == 1)
- {
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,1551.4275,-1675.0511,15.8413); //puts player in the jail
- SetPlayerFacingAngle(i,90.0000);
- SetCameraBehindPlayer(i);
- }
- else if(PlayerInfo[i][pJailed] == 2)
- {
- if(PlayerCell == 0)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 0.0);
- }
- if(PlayerCell == 1)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 0.0);
- }
- if(PlayerCell == 2)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 0.0);
- }
- if(PlayerCell == 3)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 0.0);
- }
- if(PlayerCell == 4)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 0.0);
- }
- if(PlayerCell == 5)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 0.0);
- }
- if(PlayerCell == 6)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 180.0);
- }
- if(PlayerCell == 7)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 180.0);
- }
- if(PlayerCell == 8)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 180.0);
- }
- if(PlayerCell == 9)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 180.0);
- }
- if(PlayerCell == 10)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 180.0);
- }
- if(PlayerCell == 11)
- {
- SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
- SetPlayerFacingAngle( i, 180.0);
- }
- }
- /* if(PlayerInfo[playerid][pJailed] == 3)
- {
- SetPlayerPos(playerid, -1070.8547,-2040.0,49.1448);
- SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
- TogglePlayerControllable(playerid, 1);
- SetCameraBehindPlayer(playerid);
- }*/
- PlayerInfo[i][pJailed] = 0;
- SendClientMessage(i, COLOR_GRAD1," You have paid your debt to society.");
- format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
- GameTextForPlayer(i, string, 5000, 1);
- SetCameraBehindPlayer(i);
- TogglePlayerControllable(i, 1);
- ClearCrime(i);
- SetPlayerToTeamColor(i);
- }
- }
- //moneycheat
- if(GetPlayerMoney(i) != PlayerInfo[i][pCash])
- {
- ResetPlayerMoney(i);
- GivePlayerMoney(i,PlayerInfo[i][pCash]);
- }
- if(UsedFind[i] >= 1)
- {
- UsedFind[i] += 1;
- if(UsedFind[i] >= FReloadTime[i])
- {
- UsedFind[i] = 0;
- }
- }
- if(GotMats[i] >= 1)
- {
- GotMats[i] += 1;
- if(GotMats[i] >= 10)
- {
- GotMats[i] = 0;
- }
- }
- if(HospitalTime[i] >= 1)
- {
- if(HospitalTime[i] >= 49)
- {
- new cut = deathcost;
- if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4) //medics
- {
- cut = deathcost/2;
- }
- PlayerInfo[i][pCash] = PlayerInfo[i][pCash]-cut;
- GivePlayerMoney(i, PlayerInfo[i][pCash]);
- format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, have a nice day.", cut);
- SendClientMessage(i, COLOR_WHITE, string);
- SetPlayerHealth(i, 45);
- SetPlayerArmour(i, PlayerInfo[i][pSHealth]);
- SetPlayerPos(i, HospitalSpawns[HospitalSpawn[i]][0], HospitalSpawns[HospitalSpawn[i]][1], HospitalSpawns[HospitalSpawn[i]][2]);
- SetPlayerFacingAngle(i, HospitalSpawns[HospitalSpawn[i]][3]);
- HospitalTime[i] = 0; HospitalSpawn[i] = 0; PlayerInfo[i][pHospital] = 0; PlayerInfo[i][pDeaths] += 1;
- TogglePlayerControllable(i, 1);
- SetCameraBehindPlayer(i);
- SetPlayerToTeamColor(i);
- }
- else
- {
- if(HospitalTime[i] < 5)
- {
- SetPlayerHealth(i, 1);
- }
- else
- {
- new Float:health;
- GetPlayerHealth(i, health);
- SetPlayerHealth(i, health += 1);
- }
- HospitalTime[i] += 1;
- }
- }
- if(PlayerInfo[i][pSuspendLic] > 0)//suspendedlicense
- {
- if(PlayerInfo[i][pSuspendLic] == 1)
- {
- if(PlayerInfo[i][pCarLic] == 2)
- {
- SendClientMessage(i, COLOR_YELLOW, " Your suspension is over and have been charged $10 for a new license.");
- SendClientMessage(i, TEAM_GROVE_COLOR, " Drive safely.");
- GameTextForPlayer(i,"~r~$10", 5000, 3);
- GivePlayerMoney(i,-10);
- PlayerInfo[i][pCarLic] = 1;
- PlayerInfo[i][pSuspendLic] -= 1;
- }
- else if(PlayerInfo[i][pCarLic] == 3)
- {
- SendClientMessage(i, COLOR_YELLOW, " Your license is no longer cancelled, you may purchase a new license from the DMV.");
- PlayerInfo[i][pCarLic] = 0;
- PlayerInfo[i][pSuspendLic] -= 1;
- }
- else
- {
- PlayerInfo[i][pSuspendLic] -= 1;
- }
- }
- else if(PlayerInfo[i][pSuspendLic] <= 0)
- {
- PlayerInfo[i][pSuspendLic] = 0;
- }
- else
- {
- PlayerInfo[i][pSuspendLic] -= 1;
- }
- }
- if(WantLawyer[i] >= 1)
- {
- CallLawyer[i] = 111;
- if(WantLawyer[i] == 1)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
- }
- WantLawyer[i] ++;
- if(WantLawyer[i] == 8)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
- }
- if(WantLawyer[i] == 15)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
- }
- if(WantLawyer[i] == 20)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "There is no Lawyer available to you anymore, Jail Time started.");
- WantLawyer[i] = 0;
- CallLawyer[i] = 0;
- }
- }
- if(TutTime[i] >= 1)
- {
- TutTime[i] += 1;
- if(TutTime[i] == 3)
- {
- ClearChatbox(i, 100);
- ShowTUT(i);
- TextDrawShowForPlayer(i, TutText[0]);
- //FadeColorForPlayer(i,0,0,0,0,0,0,0,255,15,0);
- }
- else if(TutTime[i] == 15) // Houses
- {
- SetPlayerPos(i, 2268.8899,-2602.1863,4.1938);
- SetPlayerCameraPos(i, 2178.9834,-2649.7114,30.5982);
- SetPlayerCameraLookAt(i, 2178.9834,-2649.7114,30.5982);
- }
- else if(TutTime[i] == 17)
- {
- TextDrawHideForPlayer(i, TutText[0]);
- TextDrawShowForPlayer(i, TutText[1]);
- }
- else if(TutTime[i] == 35) // Businesses
- {
- SetPlayerPos(i, 1250.8257,-1076.3053,0.0000);
- SetPlayerCameraPos(i, 1248.8798,-1079.0498,32.4765);
- SetPlayerCameraLookAt(i, 1248.8798,-1079.0498,32.4765);
- }
- else if(TutTime[i] == 37)
- {
- TextDrawHideForPlayer(i, TutText[1]);
- TextDrawShowForPlayer(i, TutText[2]);
- }
- else if(TutTime[i] == 55) // Dealerships
- {
- SetPlayerPos(i, 1317.1320,-1555.4285,0.0000);
- SetPlayerCameraPos(i, 1320.8629,-1558.1262,14.5703);
- SetPlayerCameraLookAt(i, 1320.8629,-1558.1262,14.5703);
- }
- else if(TutTime[i] == 57)
- {
- TextDrawHideForPlayer(i, TutText[2]);
- TextDrawShowForPlayer(i, TutText[3]);
- }
- else if(TutTime[i] == 75) // AD Agencies
- {
- SetPlayerPos(i, 563.7955,-1275.2495,0.0000);
- SetPlayerCameraPos(i, 516.7933,-1275.3964,22.6855);
- SetPlayerCameraLookAt(i, 516.7933,-1275.3964,22.6855);
- }
- else if(TutTime[i] == 77)
- {
- //PlayAudioStreamForPlayer(i,"https://dl.dropbox.com/u/54373498/Spiderman%202%20music%20trailer%20-40sec%20-%20Lacrimosa.mp3");
- ClearChatbox(i, 100);
- TextDrawHideForPlayer(i, TutText[3]);
- TextDrawShowForPlayer(i, TutText[4]);
- }
- else if(TutTime[i] == 95) // WareHouses
- {
- SetPlayerPos(i, 628.8734,-1356.3269,0.0000);
- SetPlayerCameraPos(i, 625.2649,-1356.8220,15.9045);
- SetPlayerCameraLookAt(i, 625.2649,-1356.8220,15.9045);
- }
- else if(TutTime[i] == 97)
- {
- TextDrawHideForPlayer(i, TutText[4]);
- TextDrawShowForPlayer(i, TutText[5]);
- }
- else if(TutTime[i] == 115) // The End
- {
- SetPlayerPos(i, 1305.5662841797,-1543.8950195313,122.20141601563);
- SetPlayerCameraPos(i, 1460.0, -1324.0, 287.2);
- SetPlayerCameraLookAt(i, 1374.5, -1291.1, 239.0);
- }
- else if(TutTime[i] == 117)
- {
- TextDrawHideForPlayer(i, TutText[5]);
- TextDrawShowForPlayer(i, TutText[6]);
- }
- else if(TutTime[i] == 135)
- {
- TextDrawHideForPlayer(i, TutText[6]);
- TextDrawShowForPlayer(i, TutText[7]);
- //FadeColorForPlayer(i,0,0,0,0,0,0,0,255,15,0);
- }
- else if(TutTime[i] == 150)
- {
- HideTUT(i);
- HideGUI(i);
- //FadeColorForPlayer(i,0,0,0,255,0,0,0,0,15,0);
- SendClientMessage(i, COLOR_WHITE, "[Life-Story]- After 20 years of prison... It's freedom - Spending a 20 year in prison isn't with an easy thing , It's time to get back.");
- SendClientMessage(i, COLOR_WHITE, "[Life-Story]- However , Your criminal records have been deleted - You are now clean , You can start clean.. Or stay dirty.");
- SendClientMessage(i, COLOR_WHITE, "[Life-Story]- Your life - Your rules , What will you do ?");
- SendClientMessage(i, COLOR_LIGHTRED, "(( OOC : Head to the Renting-Shop near unity station incase you need to rent a vehicle. ))");
- CanTalk[i] = 1;
- TutTime[i] = 0;
- PlayerInfo[i][pSafeSpawn] = 1;
- PlayerInfo[i][pTut] = 1;
- gOoc[i] = 0; gNewbie[i] = 0; gNews[i] = 0; gFam[i] = 0;
- TogglePlayerControllable(i, 1);
- PlayerInfo[i][pHealth] = 100;
- PlayerInfo[i][pArmor] = 0;
- SetPlayerSpawn(i);
- ApplyAnimation(i,"PED","WALK_GANG1",4.1,1,1,1,50,1);
- }
- }
- }
- if(PlayerTazeTime[i] >= 1)
- {
- PlayerTazeTime[i] += 1;
- if(PlayerTazeTime[i] == 15)
- {
- PlayerTazeTime[i] = 0;
- }
- else
- {
- new Float:angle;
- GetPlayerFacingAngle(i, angle);
- SetPlayerFacingAngle(i, angle + 90);
- }
- }
- if(PlayerPotStoned[i] >= 6)
- {
- PlayerPotStoned[i] += 1;
- if(IsPlayerInAnyVehicle(i))
- {
- if(GetPlayerState(i) == 2)
- {
- if(PlayerPotStoned[i] == 10 || PlayerPotStoned[i]==20 || PlayerPotStoned[i]==30 || PlayerPotStoned[i]==40 || PlayerPotStoned[i]==50)
- {
- new Float:angle;
- GetPlayerFacingAngle(i, angle);
- SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
- SetPlayerWeather(i, -59);
- }
- }
- }
- if(PlayerPotStoned[i] == 60)
- {
- PlayerPotStoned[i] = 0;
- SendClientMessage(i,COLOR_GREY," You are no longer stoned !");
- SetPlayerDrunkLevel(i, 0);
- SetPlayerWeather(i, 12);
- }
- }
- if(PlayerCrackStoned[i] >= 6)
- {
- PlayerCrackStoned[i] += 1;
- if(IsPlayerInAnyVehicle(i))
- {
- if(GetPlayerState(i) == 2)
- {
- if(PlayerCrackStoned[i] == 10 || PlayerCrackStoned[i]==20 || PlayerCrackStoned[i]==30 || PlayerCrackStoned[i]==40 || PlayerCrackStoned[i]==50)
- {
- new Float:angle;
- GetPlayerFacingAngle(i, angle);
- SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
- SetPlayerWeather(i, 16);
- }
- }
- }
- if(PlayerCrackStoned[i] == 60)
- {
- PlayerCrackStoned[i] = 0;
- SendClientMessage(i,COLOR_GREY," You are no longer stoned !");
- SetPlayerDrunkLevel(i, 0);
- SetPlayerWeather(i, 12);
- }
- }
- if(Called911[i] > 0)
- {
- Called911[i] += 1;
- if(Called911[i] == 120)
- {
- SetPlayerToTeamColor(i);
- Called911[i] = 0;
- }
- }
- if(PlayerInfo[i][pCarTime] > 0)
- {
- if(PlayerInfo[i][pCarTime] <= 0)
- {
- PlayerInfo[i][pCarTime] = 0;
- }
- else
- {
- PlayerInfo[i][pCarTime] -= 1;
- }
- }
- if(PlayerInfo[i][pDrugsTime] > 0)
- {
- if(PlayerInfo[i][pDrugsTime] <= 0)
- {
- PlayerInfo[i][pDrugsTime] = 0;
- }
- else
- {
- PlayerInfo[i][pDrugsTime] -= 1;
- }
- }
- if(PlayerInfo[i][pLawyerTime] > 0)
- {
- if(PlayerInfo[i][pLawyerTime] <= 0)
- {
- PlayerInfo[i][pLawyerTime] = 0;
- }
- else
- {
- PlayerInfo[i][pLawyerTime] -= 1;
- }
- }
- if(PlayerInfo[i][pLawyerFreeTime] > 0)
- {
- if(PlayerInfo[i][pLawyerFreeTime] <= 0)
- {
- PlayerInfo[i][pLawyerFreeTime] = 0;
- }
- else
- {
- PlayerInfo[i][pLawyerFreeTime] -= 1;
- }
- }
- if(PlayerInfo[i][pMechTime] > 0)
- {
- if(PlayerInfo[i][pMechTime] <= 0)
- {
- PlayerInfo[i][pMechTime] = 0;
- }
- else
- {
- PlayerInfo[i][pMechTime] -= 1;
- }
- }
- if(PlayerInfo[i][pSexTime] > 0)
- {
- if(PlayerInfo[i][pSexTime] <= 0)
- {
- PlayerInfo[i][pSexTime] = 0;
- }
- else
- {
- PlayerInfo[i][pSexTime] -= 1;
- }
- }
- if(BoxWaitTime[i] > 0)
- {
- if(BoxWaitTime[i] >= BoxDelay)
- {
- BoxDelay = 0;
- BoxWaitTime[i] = 0;
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(i, "~g~Match Started", 5000, 1);
- TogglePlayerControllable(i, 1);
- RoundStarted = 1;
- }
- else
- {
- format(string, sizeof(string), "%d", BoxDelay - BoxWaitTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- BoxWaitTime[i] += 1;
- }
- }
- if(RoundStarted > 0)
- {
- if(PlayerBoxing[i] > 0)
- {
- new trigger = 0;
- new Lost = 0;
- new Float:angle;
- new Float:health;
- GetPlayerHealth(i, health);
- if(health < 12)
- {
- if(i == Boxer1) { Lost = 1; trigger = 1; }
- else if(i == Boxer2) { Lost = 2; trigger = 1; }
- }
- if(health < 28) { GetPlayerFacingAngle(i, angle); SetPlayerFacingAngle(i, angle + 85); }
- if(trigger)
- {
- new winner[MAX_PLAYER_NAME];
- new loser[MAX_PLAYER_NAME];
- new titel[MAX_PLAYER_NAME];
- if(Lost == 1)
- {
- if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
- {
- SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
- GetPlayerName(Boxer1, loser, sizeof(loser));
- GetPlayerName(Boxer2, winner, sizeof(winner));
- if(PlayerInfo[Boxer1][pJob] == 12) { PlayerInfo[Boxer1][pLoses] += 1; }
- if(PlayerInfo[Boxer2][pJob] == 12) { PlayerInfo[Boxer2][pWins] += 1; }
- if(TBoxer < 255)
- {
- if(IsPlayerConnected(TBoxer))
- {
- if(TBoxer != Boxer2)
- {
- if(PlayerInfo[Boxer2][pJob] == 10)
- {
- TBoxer = Boxer2;
- GetPlayerName(TBoxer, titel, sizeof(titel));
- new nstring[MAX_PLAYER_NAME];
- format(nstring, sizeof(nstring), "%s", titel);
- strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
- SaveBoxer();
- format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- }
- else
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
- }
- }
- else
- {
- GetPlayerName(TBoxer, titel, sizeof(titel));
- format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[Boxer2][pLoses];
- SaveBoxer();
- }
- }
- }//TBoxer
- format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer1, "~r~You lost", 3500, 1);
- format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer2, "~r~You won", 3500, 1);
- if(GetPlayerHealth(Boxer1, health) < 20)
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer1, 30.0);
- }
- else
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer1, 50.0);
- }
- if(GetPlayerHealth(Boxer2, health) < 20)
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer2, 30.0);
- }
- else
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer2, 50.0);
- }
- GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
- if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pBoxSkill] += 1; }
- PlayerBoxing[Boxer1] = 0;
- PlayerBoxing[Boxer2] = 0;
- }
- }
- else if(Lost == 2)
- {
- if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
- {
- SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
- GetPlayerName(Boxer1, winner, sizeof(winner));
- GetPlayerName(Boxer2, loser, sizeof(loser));
- if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pLoses] += 1; }
- if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pWins] += 1; }
- if(TBoxer < 255)
- {
- if(IsPlayerConnected(TBoxer))
- {
- if(TBoxer != Boxer1)
- {
- if(PlayerInfo[Boxer1][pJob] == 10)
- {
- TBoxer = Boxer1;
- GetPlayerName(TBoxer, titel, sizeof(titel));
- new nstring[MAX_PLAYER_NAME];
- format(nstring, sizeof(nstring), "%s", titel);
- strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
- SaveBoxer();
- format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- }
- else
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
- }
- }
- else
- {
- GetPlayerName(TBoxer, titel, sizeof(titel));
- format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
- SaveBoxer();
- }
- }
- }//TBoxer
- format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer2, "~r~You lost", 3500, 1);
- format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer1, "~g~You won", 3500, 1);
- if(GetPlayerHealth(Boxer1, health) < 20)
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer1, 30.0);
- }
- else
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer1, 50.0);
- }
- if(GetPlayerHealth(Boxer2, health) < 20)
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer2, 30.0);
- }
- else
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer2, 50.0);
- }
- GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
- if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pBoxSkill] += 1; }
- PlayerBoxing[Boxer1] = 0;
- PlayerBoxing[Boxer2] = 0;
- }
- }
- InRing = 0;
- RoundStarted = 0;
- Boxer1 = 255;
- Boxer2 = 255;
- TBoxer = 255;
- trigger = 0;
- }
- }
- }
- if(StartingPaintballRound == 1 && AnnouncedPaintballRound == 0)
- {
- AnnouncedPaintballRound = 1;
- if(PlayerPaintballing[i] != 0)
- {
- SendClientMessage(i, COLOR_YELLOW, "Paintball Match will be announced in 15 seconds.");
- }
- }
- if(FindTime[i] > 0)
- {
- if(FindTime[i] == FindTimePoints[i])
- {
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- GameTextForPlayer(i, "~r~Redmarker gone", 2500, 1);
- FindTime[i] = 0;
- FindTimePoints[i] = 0;
- new target = FindingID[i];
- if(Called911[target] != 0)
- {
- SetAllCopCheckpoint(target);
- }
- else
- {
- SetPlayerToTeamColor(target);
- }
- FindingID[i] = 0;
- }
- else
- {
- format(string, sizeof(string), "%d", FindTimePoints[i] - FindTime[i]);
- GameTextForPlayer(i, string, 1500, 5);
- FindTime[i] += 1;
- }
- }
- if(TaxiCallTime[i] > 0)
- {
- if(TaxiAccepted[i] < 999)
- {
- if(IsPlayerConnected(TaxiAccepted[i]))
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(TaxiAccepted[i], X, Y, Z);
- SetPlayerCheckpoint(i, X, Y, Z, 5);
- }
- }
- }
- if(BusCallTime[i] > 0)
- {
- if(BusAccepted[i] < 999)
- {
- if(IsPlayerConnected(BusAccepted[i]))
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(BusAccepted[i], X, Y, Z);
- SetPlayerCheckpoint(i, X, Y, Z, 5);
- }
- }
- }
- if(MedicCallTime[i] > 0)
- {
- if(MedicCallTime[i] == 30) { MedicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
- else
- {
- format(string, sizeof(string), "%d", 30 - MedicCallTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- MedicCallTime[i] += 1;
- }
- }
- if(LawyerCallTime[i] > 0)
- {
- if(LawyerCallTime[i] == 30) { LawyerCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
- else
- {
- format(string, sizeof(string), "%d", 30 - LawyerCallTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- LawyerCallTime[i] += 1;
- }
- }
- if(MechanicCallTime[i] > 0)
- {
- if(MechanicCallTime[i] == 30) { MechanicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
- else
- {
- format(string, sizeof(string), "%d", 30 - MechanicCallTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- MechanicCallTime[i] += 1;
- }
- }
- if(PlayerCuffed[i] == 1)
- {
- if(PlayerCuffedTime[i] <= 0)
- {
- ClearAnimations(i);
- TogglePlayerControllable(i, 1);
- PlayerCuffed[i] = 0;
- PlayerCuffedTime[i] = 0;
- PlayerTazeTime[i] = 0;
- }
- else
- {
- PlayerCuffedTime[i] -= 1;
- }
- }
- if(PlayerCuffed[i] == 2)
- {
- if(PlayerCuffedTime[i] <= 0)
- {
- GameTextForPlayer(i, "~r~You broke the Cuffs, you are free!", 2500, 3);
- TogglePlayerControllable(i, 1);
- PlayerCuffed[i] = 0;
- PlayerCuffedTime[i] = 0;
- }
- else
- {
- PlayerCuffedTime[i] -= 1;
- }
- }
- if(PlayerTied[i] == 1)
- {
- if(PlayerCuffedTime[i] <= 0)
- {
- GameTextForPlayer(i, "~r~You broke free of the Ropes, you are free!", 2500, 3);
- SetCameraBehindPlayer(i);
- PlayerBlinded[i] = 0;
- TogglePlayerControllable(i, 1);
- PlayerTied[i] = 0;
- PlayerCuffedTime[i] = 0;
- }
- else
- {
- PlayerCuffedTime[i] -= 1;
- }
- }
- /*
- if(IsPlayerInRangeOfPoint(i,20,2015.4500,1017.0900,996.8750))
- {//Four Dragons
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(IsPlayerInRangeOfPoint(i,20,2233.9099,1710.7300,1011.2987))
- {//Caligula
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(IsPlayerInRangeOfPoint(i,10,2265.7900,1619.5800,1090.4453))
- {//Caligula Roof 1
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(IsPlayerInRangeOfPoint(i,10,2265.7800,1675.9301,1090.4453))
- {//Caligula Roof 2
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(IsPlayerInRangeOfPoint(i,20,1133.0699,-9.5731,1000.6797))
- {//West Casino place
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- */
- }
- }
- //}
Advertisement
Add Comment
Please, Sign In to add comment