I need help seriously ....
#1

....
Reply
#2

use [pawn] & [/pawn] tags before and after your code.
Reply
#3

How do i use /pawn... i dont get it
Reply
#4

[pawn] code_here [/pawn]
Reply
#5

Dwayne
Reply
#6

Please show line no. 46766
Reply
#7

Big! Let me check it.
pawn Code:
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, 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] == 18) { PlayerInfo[Boxer1][pLoses] += 1; }
                    if(PlayerInfo[Boxer2][pJob] == 18) { PlayerInfo[Boxer2][pWins] += 1; }
                    if(TBoxer < 255) {
                        if(IsPlayerConnected(TBoxer)) {
                            if(TBoxer != Boxer2) {
                                if(PlayerInfo[Boxer2][pJob] == 18) {
                                    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] == 18) { 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] == 18) { PlayerInfo[Boxer2][pLoses] += 1; }
                    if(PlayerInfo[Boxer1][pJob] == 18) { PlayerInfo[Boxer1][pWins] += 1; }
                    if(TBoxer < 255) {
                        if(IsPlayerConnected(TBoxer)) {
                            if(TBoxer != Boxer1) {
                                if(PlayerInfo[Boxer1][pJob] == 18) {
                                    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] == 18) { PlayerInfo[Boxer1][pBoxSkill] += 1; }
                    PlayerBoxing[Boxer1] = 0;
                    PlayerBoxing[Boxer2] = 0;
                }
            }
            InRing = 0;
            RoundStarted = 0;
            Boxer1 = 255;
            Boxer2 = 255;
            TBoxer = 255;
            trigger = 0;
        }
    }
}
Reply
#8

How do i do that
Reply
#9

Quote:
Originally Posted by Wizz123
View Post
How do i do that
This ...

PHP Code:
[pawn/* ... */[/pawn
would create this ...

pawn Code:
/* ... */
... so edit your first post.
Reply
#10

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
Okay fixed :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)