22.02.2012, 11:53
Quote:
Originally Posted by [pawn
Wizz123;1691707]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 < 2 { 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, 2859.7590,1792.3278,12.6986); SetPlayerPos(Boxer2, 2864.3733,1787.9513,12.6986); SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5); GetPlayerName(Boxer1, loser, sizeof(loser)); GetPlayerName(Boxer2, winner, sizeof(winner)); if(PlayerInfo[Boxer1][pJob] == 1 { PlayerInfo[Boxer1][pLoses] += 1; } if(PlayerInfo[Boxer2][pJob] == 1 { PlayerInfo[Boxer2][pWins] += 1; } if(TBoxer < 255) { if(IsPlayerConnected(TBoxer)) { if(TBoxer != Boxer2) { if(PlayerInfo[Boxer2][pJob] == 1 { 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), "Fighting News: %s has Won the fight against Champion %s and is now the new HUFC Champion.", titel, loser); OOCOff(COLOR_WHITE,string); } else { SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Hultimate Job !"); } } else { GetPlayerName(TBoxer, titel, sizeof(titel)); format(string, sizeof(string), "Fighting News: Hultimate 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] == 1 { PlayerInfo[Boxer2][pBoxSkill] += 1; } PlayerBoxing[Boxer1] = 0; PlayerBoxing[Boxer2] = 0; } } else if(Lost == 2) { if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2)) { SetPlayerPos(Boxer1, 2865.5793,1799.5563,11.8466); SetPlayerPos(Boxer2, 2865.5793,1799.5563,11.8466); SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5); GetPlayerName(Boxer1, winner, sizeof(winner)); GetPlayerName(Boxer2, loser, sizeof(loser)); if(PlayerInfo[Boxer2][pJob] == 1 { PlayerInfo[Boxer2][pLoses] += 1; } if(PlayerInfo[Boxer1][pJob] == 1 { PlayerInfo[Boxer1][pWins] += 1; } if(TBoxer < 255) { if(IsPlayerConnected(TBoxer)) { if(TBoxer != Boxer1) { if(PlayerInfo[Boxer1][pJob] == 1 { 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), "HUFC News: %s has Won the fight against Champion %s and is now the new Hultimate Champion.", titel, loser); OOCOff(COLOR_WHITE,string); } else { SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Hultimate Job !"); } } else { GetPlayerName(TBoxer, titel, sizeof(titel)); format(string, sizeof(string), "HUFC News: Hultimate 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] == 1 { PlayerInfo[Boxer1][pBoxSkill] += 1; } PlayerBoxing[Boxer1] = 0; PlayerBoxing[Boxer2] = 0; } } InRing = 0; RoundStarted = 0; Boxer1 = 255; Boxer2 = 255; TBoxer = 255; trigger = 0; } } } [/pawn] THE ERRORS ARE: ****** Chrome\File Manager\Gamemodes\WizzSquiz.pwn(46766) : error 047: array sizes do not match, or destination array is too small ****** Chrome\File Manager\Gamemodes\WizzSquiz.pwn(46766) : error 047: array sizes do not match, or destination array is too small |