SA-MP Forums Archive
[Ajuda] Erro sistema de duelo. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erro sistema de duelo. (/showthread.php?tid=603804)



Erro sistema de duelo. - zGuigui2068 - 27.03.2016

to criando um sistema de duelo com base no /lutar que й sу para os Boxeadores...

eu criei acho que tudo certo mas trava o pawn olha sу...


Vou postar todo codigo aq...
PHP код:
            if(DuelWaitTime[i] > 0)
            {
                if(
DuelWaitTime[i] >= DuelDelay)
                {
                    
DuelDelay 0;
                    
DuelWaitTime[i] = 0;
                    
PlayerPlaySound(i10570.00.00.0);
                    
GameTextForPlayer(i"~g~A Luta Comeзou"50001);
                    
TogglePlayerControllable(i1);
                    
SetPlayerArmour(i100.0);
                    
DuelStarted 1;
                }
                else
                {
                    
format(gstringsizeof(gstring), "%d"DuelDelay DuelWaitTime[i]);
                    
GameTextForPlayer(igstring15006);
                    
DuelWaitTime[i] += 1;
                }
            }
            if(
DuelStarted 0// Fim duel started// Fim duel started// Fim duel started// Fim duel started// Fim duel started// Fim duel started
            
{
                    new 
trigger 0;
                    new 
Lost 0;
                    new 
Float:angle;
                    new 
Float:health;
                    
GetPlayerHealth(ihealth);
                    if(
health 12)
                    {
                        if(
== pduel1) { Lost 1trigger 1; }
                        else if(
== pduel2) { Lost 2trigger 1; }
                    }
                    if(
health 28) { GetPlayerFacingAngle(iangle); SetPlayerFacingAngle(iangle 85); }
                    if(
trigger)
                    {
                        new 
winner[MAX_PLAYER_NAME];
                        new 
loser[MAX_PLAYER_NAME];
                        new 
titel[MAX_PLAYER_NAME];
                        if(
Lost == 1)
                        {
                            if(
IsPlayerConnected(pduel1) && IsPlayerConnected(pduel2))
                            {
                                
SetPlayerPos(pduel1298.3701,-142.0678,1004.0625); SetPlayerPos(pduel2298.3701,-142.0678,1004.0625);
                                
SetPlayerInterior(Boxer15); SetPlayerInterior(pduel25);
                                
GetPlayerName(pduel1losersizeof(loser));
                                
GetPlayerName(pduel2winnersizeof(winner));
                                if(
TDuel 255)
                                {
                                    if(
IsPlayerConnected(TBoxer))
                                    {
                                        if(
TDuel != pduel2)
                                        {
                                                
TDuel pduel2;
                                                
GetPlayerName(TBoxertitelsizeof(titel));
                                                new 
nstring[MAX_PLAYER_NAME];
                                                
format(nstringsizeof(nstring), "%s"titel);
                                                
strmid(Titel[TitelName], nstring0strlen(nstring), 255);
                                                
Titel[TitelWins] = PlayerInfo[TDuel][pWins];
                                                
Titel[TitelLoses] = PlayerInfo[TDuel][pLoses];
                                                
format(gstringsizeof(gstring), "Noticias Duelo x1: %s venceu um x1 contra %s.",  titelloser);
                                                
OOCNews(COLOR_WHITE,gstring);
                                        }
                                        else
                                        {
                                            
GetPlayerName(TBoxertitelsizeof(titel));
                                            
format(gstringsizeof(gstring), "Noticias: %s venceu um duelo contra %s.",  titelloser);
                                            
OOCNews(COLOR_WHITE,gstring);
                                            
Titel[TitelWins] = PlayerInfo[pduel1][pWins];
                                            
Titel[TitelLoses] = PlayerInfo[pduel2][pLoses];
                                            
SaveBoxer();
                                        }
                                    }
                                }
//TBoxer
                                
format(gstringsizeof(gstring), " Vocк perdeu o duelo contra %s."winner);
                                
SendClientMessage(pduel1COLOR_LIGHTBLUEgstring);
                                
GameTextForPlayer(pduel1"~r~Voce Perdeu"35001);
                                
format(gstringsizeof(gstring), " Vocк ganhou o duelo contra %s."loser);
                                
SendClientMessage(pduel2COLOR_LIGHTBLUEgstring);
                                
GameTextForPlayer(pduel2"~r~Voce Venceu"35001);
                                if(
GetPlayerHealth(pduel1health) < 20)
                                {
                                    
SendClientMessage(pduel1COLOR_LIGHTBLUE" Vocк Quase perdeu esse duelo");
                                    
SetPlayerHealth(pduel1100);
                                }
                          else
                                {
                                    
SendClientMessage(pduel1COLOR_LIGHTBLUE" Vocк continua em bom estado apуs a luta.");
                                    
SetPlayerHealth(pduel1100);
                                }
                                if(
GetPlayerHealth(pduel2health) < 20)
                                {
                                    
SendClientMessage(pduel2COLOR_LIGHTBLUE" Vocк Quase perdeu esse duelo");
                                    
SetPlayerHealth(pduel2100);
                                }
                                else
                                {
                                    
SendClientMessage(pduel2COLOR_LIGHTBLUE" Vocк continua em bom estado apуs a luta.");
                                    
SetPlayerHealth(pduel2100);
                                }
                                
GameTextForPlayer(pduel1"~g~Fim da Luta"50001); GameTextForPlayer(pduel2"~g~Fim da Luta"50001);
                                
PlayerBoxing[pduel1] = 0;
                                
PlayerBoxing[pduel2] = 0;
                            }
                        }
                        else if(
Lost == 2)
                        {
                            if(
IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
                            {
                                
SetPlayerPos(pduel1298.3701,-142.0678,1004.0625); SetPlayerPos(pduel2298.3701,-142.0678,1004.0625);
                                
SetPlayerInterior(pduel15); SetPlayerInterior(pduel25);
                                
GetPlayerName(pduel1winnersizeof(winner));
                                
GetPlayerName(pduel2losersizeof(loser));
                                if(
TDuel 255)
                                {
                                    if(
IsPlayerConnected(TDuel))
                                    {
                                        if(
TDuel != pduel1)
                                        {
                                                
TDuel pduel1;
                                                
GetPlayerName(TDueltitelsizeof(titel));
                                                new 
nstring[MAX_PLAYER_NAME];
                                                
format(nstringsizeof(nstring), "%s"titel);
                                                
strmid(Titel[TitelName], nstring0strlen(nstring), 255);
                                                
Titel[TitelWins] = PlayerInfo[TDuel][pWins];
                                                
Titel[TitelLoses] = PlayerInfo[TDuel][pLoses];
                                                
format(gstringsizeof(gstring), "Noticias do Boxe: %s venceu a luta contra %s e agora й o campeгo.",  titelloser);
                                                
OOCNews(COLOR_WHITE,gstring);
                                            }
                                            else
                                            {
                                                
SendClientMessage(Boxer1COLOR_GREY" Vocк precisa ser um lutador de boxe para ganhar uma luta!");
                                            }
                                        }
                                        else
                                        {
                                            
GetPlayerName(TDueltitelsizeof(titel));
                                            
format(gstringsizeof(gstring), "Noticias do Boxe: %s venceu a luta contra %s.",  titelloser);
                                            
OOCNews(COLOR_WHITE,gstring);
                                            
Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
                                            
Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
                                        }
                                    }
                                }
//TBoxer
                                
format(gstringsizeof(gstring), " Vocк perdeu a luta contra %s."winner);
                                
SendClientMessage(pduel2COLOR_LIGHTBLUEgstring);
                                
GameTextForPlayer(pduel2"~r~Voce Perdeu"35001);
                                
format(gstringsizeof(gstring), " Vocк ganhou a luta contra %s."loser);
                                
SendClientMessage(pduel1COLOR_LIGHTBLUEgstring);
                                
GameTextForPlayer(pduel1"~g~Voce Venceu"35001);
                                if(
GetPlayerHealth(pduel1health) < 20)
                                {
                                    
SendClientMessage(pduel1COLOR_LIGHTBLUE" Vocк estб exausto da luta, vб se recuperar.");
                                    
SetPlayerHealth(pduel1100);
                                }
                                else
                                {
                                    
SendClientMessage(pduel1COLOR_LIGHTBLUE" Vocк continua em bom estado apуs a luta.");
                                    
SetPlayerHealth(pduel1100);
                                }
                                if(
GetPlayerHealth(pduel2health) < 20)
                                {
                                    
SendClientMessage(pduel2COLOR_LIGHTBLUE" Vocк estб exausto da luta, vб se recuperar.");
                                    
SetPlayerHealth(pduel2100);
                                }
                                else
                                {
                                    
SendClientMessage(pduel2COLOR_LIGHTBLUE" Vocк continua em bom estado apуs a luta.");
                                    
SetPlayerHealth(pduel2100);
                                }
                                
GameTextForPlayer(pduel1"~g~Fim da luta"50001); GameTextForPlayer(pduel2"~g~Fim da luta"50001);
                                
PlayerDuelando[pduel1] = 0;
                                
PlayerDuelando[pduel2] = 0;
                            }
                        }
                        
InPartida 0;
                        
DuelStarted 0;
                        
pduel1 255;
                        
pduel2 255;
                        
TDuel 255;
                        
trigger 0;
                    }
                }
            }
// Fim duel started // Fim duel started // Fim duel started// Fim duel started// Fim duel started// Fim duel started// Fim duel started 
PHP код:
        if(strcmp(cmd"/duelar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
InPartida 0//ja tem x1
            
{
                
SendClientMessage(playeridCOLOR_GREY"   Jб estб tendo uma luta, espere ela terminar !");
                return 
1;
            }
            if(
PlayerDuelando[playerid] > 0// vocк ja esta duelando
            
{
                
SendClientMessage(playeridCOLOR_GREY"   vocк jб esta duelando !");
                return 
1;
            }
            if(!
PlayerToPoint(20.0,playerid,306.6657,-141.7108,1004.0625))
            {
                
SendClientMessage(playeridCOLOR_GREY"  Vocк nгo estб na area de duelo!");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp)) {
                
SendClientMessage(playeridCOLOR_WHITE"USE: /duelar [id]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if(
IsPlayerConnected(giveplayerid))
            {
                if(
giveplayerid != INVALID_PLAYER_ID)
                {
                    if (
ProxDetectorS(8.0playeridgiveplayerid))
                    {
                        if(
giveplayerid == playerid) { SendClientMessage(playeridCOLOR_GREY"Vocк nгo pode lutar contra si mesmo!"); return 1; }
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
format(stringsizeof(string), "* Vocк intimou %s para um duelo de boxe."giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* Jogador %s te intimou para uma luta (USE: /aceitar duelo) para aceitar."sendername);
                        
SendClientMessage(giveplayeridCOLOR_LIGHTBLUEstring);
                        
DuelOffer[giveplayerid] = playerid;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GREY"   O Jogador estб longe de Vocк, chame ele para perto.!");
                        return 
1;
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"   O Jogador Estб Offline !");
                return 
1;
            }
        }
        return 
1;
    } 
no /aceitar

PHP код:
                        else if(strcmp(x_Emprego,"Duelo",true) == 0)
            {
                if(
DuelOffer[playerid] < 999)
                {
                    if(
IsPlayerConnected(DuelOffer[playerid]))
                    {
                        
format(stringsizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde.",giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                        
format(stringsizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde.",sendername);
                        
SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUEstring);
                        
//colete
                        
SetPlayerArmour(playerid100);
                        
SetPlayerArmour(DuelOffer[playerid], 100);
                        
// Vida
                        
SetPlayerHealth(playerid100);
                        
SetPlayerHealth(DuelOffer[playerid], 100);
                        
SetPlayerInterior(playerid5); SetPlayerInterior(DuelOffer[playerid], 5);
                        
SetPlayerPos(playerid294.3664,-134.6830,1004.0625); SetPlayerFacingAngle(playerid1004.0625);
                        
SetPlayerPos(DuelOffer[playerid], 274.2308,-134.2176,1004.0625); SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                        
TogglePlayerControllable(playerid0); TogglePlayerControllable(DuelOffer[playerid], 0);
                        
GameTextForPlayer(playerid"~r~Esperando"30001); GameTextForPlayer(DuelOffer[playerid], "~r~Esperando"30001);
                        }
                        
DuelWaitTime[playerid] = 1DuelWaitTime[DuelOffer[playerid]] = 1;
                        if(
BoxDelay 1) { BoxDelay 20; }
                        
InPartida 1;
                        
pduel1 DuelOffer[playerid];
                        
pduel2 playerid;
                        
PlayerBoxing[playerid] = 1;
                        
PlayerBoxing[BoxOffer[playerid]] = 1;
                        
DuelOffer[playerid] = 999;
                        return 
1;
                    }
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   Ninguem te convidou para uma luta !");
                    return 
1;
                }
            } 



Re: Erro sistema de duelo. - zGuigui2068 - 27.03.2016

Acho que й erro nas chaves? eu n sei mecher mto com essas chaves help ?


Re: Erro sistema de duelo. - 1sbedx - 27.03.2016

Tenta isso :

PHP код:
        if(DuelWaitTime[i]>0)
        {
            if(
DuelWaitTime[i]>= DuelDelay)
            {
                
DuelDelay 0;
                
DuelWaitTime[i] = 0;
                
PlayerPlaySound(i,1057,0.0,0.0,0.0);
                
GameTextForPlayer(i,"~g~A Luta Comeзou",5000,1);
                
TogglePlayerControllable(i,1);
                
SetPlayerArmour(i,100.0);
                
DuelStarted 1;
            }
            else
            {
                
format(gstring,sizeof(gstring),"%d",DuelDelay DuelWaitTime[i]);
                
GameTextForPlayer(i,gstring,1500,6);
                
DuelWaitTime[i]+= 1;
            }
        }
        if(
DuelStarted>0// Fim duel started// Fim duel started// Fim duel started// Fim duel started// Fim duel started// Fim duel started
        
{
            new 
trigger 0;
            new 
Lost 0;
            new 
Float:angle;
            new 
Float:health;
            
GetPlayerHealth(i,health);
            if(
health 12)
            {
                if(
== pduel1)
                {
                    
Lost 1;
                    
trigger 1;
                }
                else if(
== pduel2)
                {
                    
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(pduel1) && IsPlayerConnected(pduel2))
                    {
                        
SetPlayerPos(pduel1,298.3701,-142.0678,1004.0625);
                        
SetPlayerPos(pduel2,298.3701,-142.0678,1004.0625);
                        
SetPlayerInterior(Boxer1,5);
                        
SetPlayerInterior(pduel2,5);
                        
GetPlayerName(pduel1,loser,sizeof(loser));
                        
GetPlayerName(pduel2,winner,sizeof(winner));
                        if(
TDuel 255)
                        {
                            if(
IsPlayerConnected(TBoxer))
                            {
                                if(
TDuel != pduel2)
                                {
                                    
TDuel pduel2;
                                    
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[TDuel][pWins];
                                    
Titel[TitelLoses] = PlayerInfo[TDuel][pLoses];
                                    
format(gstring,sizeof(gstring),"Noticias Duelo x1:%s venceu um x1 contra %s.",titel,loser);
                                    
OOCNews(COLOR_WHITE,gstring);
                                }
                                else
                                {
                                    
GetPlayerName(TBoxer,titel,sizeof(titel));
                                    
format(gstring,sizeof(gstring),"Noticias:%s venceu um duelo contra %s.",titel,loser);
                                    
OOCNews(COLOR_WHITE,gstring);
                                    
Titel[TitelWins] = PlayerInfo[pduel1][pWins];
                                    
Titel[TitelLoses] = PlayerInfo[pduel2][pLoses];
                                    
SaveBoxer();
                                }
                            }
                        }
                        
//TBoxer format(gstring,sizeof(gstring)," Vocк perdeu o duelo contra %s.",winner);
                        
SendClientMessage(pduel1,COLOR_LIGHTBLUE,gstring);
                        
GameTextForPlayer(pduel1,"~r~Voce Perdeu",3500,1);
                        
format(gstring,sizeof(gstring)," Vocк ganhou o duelo contra %s.",loser);
                        
SendClientMessage(pduel2,COLOR_LIGHTBLUE,gstring);
                        
GameTextForPlayer(pduel2,"~r~Voce Venceu",3500,1);
                        if(
GetPlayerHealth(pduel1,health) < 20)
                        {
                            
SendClientMessage(pduel1,COLOR_LIGHTBLUE," Vocк Quase perdeu esse duelo");
                            
SetPlayerHealth(pduel1,100);
                        }
                        else {
                            
SendClientMessage(pduel1,COLOR_LIGHTBLUE," Vocк continua em bom estado apуs a luta.");
                            
SetPlayerHealth(pduel1,100);
                        }
                        if(
GetPlayerHealth(pduel2,health) < 20)
                        {
                            
SendClientMessage(pduel2,COLOR_LIGHTBLUE," Vocк Quase perdeu esse duelo");
                            
SetPlayerHealth(pduel2,100);
                        }
                        else
                        {
                            
SendClientMessage(pduel2,COLOR_LIGHTBLUE," Vocк continua em bom estado apуs a luta.");
                            
SetPlayerHealth(pduel2,100);
                        }
                        
GameTextForPlayer(pduel1,"~g~Fim da Luta",5000,1);
                        
GameTextForPlayer(pduel2,"~g~Fim da Luta",5000,1);
                        
PlayerBoxing[pduel1] = 0;
                        
PlayerBoxing[pduel2] = 0;
                    }
                }
                else if(
Lost == 2) {
                    if(
IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
                    {
                        
SetPlayerPos(pduel1,298.3701,-142.0678,1004.0625);
                        
SetPlayerPos(pduel2,298.3701,-142.0678,1004.0625);
                        
SetPlayerInterior(pduel1,5);
                        
SetPlayerInterior(pduel2,5);
                        
GetPlayerName(pduel1,winner,sizeof(winner));
                        
GetPlayerName(pduel2,loser,sizeof(loser));
                        if(
TDuel 255) {
                            if(
IsPlayerConnected(TDuel))
                            {
                                if(
TDuel != pduel1)
                                {
                                    
TDuel pduel1;
                                    
GetPlayerName(TDuel,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[TDuel][pWins];
                                    
Titel[TitelLoses] = PlayerInfo[TDuel][pLoses];
                                    
format(gstring,sizeof(gstring),"Noticias do Boxe:%s venceu a luta contra %s e agora й o campeгo.",titel,loser);
                                    
OOCNews(COLOR_WHITE,gstring);
                                }
                                else
                                {
                                    
SendClientMessage(Boxer1,COLOR_GREY," Vocк precisa ser um lutador de boxe para ganhar uma luta!");
                                }
                            }
                            else
                            {
                                
GetPlayerName(TDuel,titel,sizeof(titel));
                                
format(gstring,sizeof(gstring),"Noticias do Boxe:%s venceu a luta contra %s.",titel,loser);
                                
OOCNews(COLOR_WHITE,gstring);
                                
Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
                                
Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
                            }
                        }
                    }
                    
//TBoxer format(gstring,sizeof(gstring)," Vocк perdeu a luta contra %s.",winner);
                    
SendClientMessage(pduel2,COLOR_LIGHTBLUE,gstring);
                    
GameTextForPlayer(pduel2,"~r~Voce Perdeu",3500,1);
                    
format(gstring,sizeof(gstring)," Vocк ganhou a luta contra %s.",loser);
                    
SendClientMessage(pduel1,COLOR_LIGHTBLUE,gstring);
                    
GameTextForPlayer(pduel1,"~g~Voce Venceu",3500,1);
                    if(
GetPlayerHealth(pduel1,health) < 20)
                    {
                        
SendClientMessage(pduel1,COLOR_LIGHTBLUE," Vocк estб exausto da luta,vб se recuperar.");
                        
SetPlayerHealth(pduel1,100);
                    }
                    else {
                        
SendClientMessage(pduel1,COLOR_LIGHTBLUE," Vocк continua em bom estado apуs a luta.");
                        
SetPlayerHealth(pduel1,100);
                    }
                    if(
GetPlayerHealth(pduel2,health) < 20)
                    {
                        
SendClientMessage(pduel2,COLOR_LIGHTBLUE," Vocк estб exausto da luta,vб se recuperar.");
                        
SetPlayerHealth(pduel2,100);
                    }
                    else
                    {
                        
SendClientMessage(pduel2,COLOR_LIGHTBLUE," Vocк continua em bom estado apуs a luta.");
                        
SetPlayerHealth(pduel2,100);
                    }
                    
GameTextForPlayer(pduel1,"~g~Fim da luta",5000,1);
                    
GameTextForPlayer(pduel2,"~g~Fim da luta",5000,1);
                    
PlayerDuelando[pduel1] = 0;
                    
PlayerDuelando[pduel2] = 0;
                }
            }
            
InPartida 0;
            
DuelStarted 0;
            
pduel1 255;
            
pduel2 255;
            
TDuel 255;
            
trigger 0;
        }
        if(
strcmp(cmd,"/duelar",true) == 0)
        {
            if(
IsPlayerConnected(playerid))
            {
                if(
InPartida>0//ja tem x1
                
{
                    
SendClientMessage(playerid,COLOR_GREY," Jб estб tendo uma luta,espere ela terminar !");
                    return 
1;
                }
                if(
PlayerDuelando[playerid]>0// vocк ja esta duelando
                
{
                    
SendClientMessage(playerid,COLOR_GREY," vocк jб esta duelando !");
                    return 
1;
                }
                if(!
PlayerToPoint(20.0,playerid,306.6657,-141.7108,1004.0625)) {
                    
SendClientMessage(playerid,COLOR_GREY," Vocк nгo estб na area de duelo!");
                    return 
1;
                }
                
tmp strtok(cmdtext,idx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playerid,COLOR_WHITE,"USE:/duelar [id]");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (
ProxDetectorS(8.0,playerid,giveplayerid))
                        {
                            if(
giveplayerid == playerid)
                            {
                                
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode lutar contra si mesmo!");
                                return 
1;
                            }
                            
GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
                            
GetPlayerName(playerid,sendername,sizeof(sendername));
                            
format(string,sizeof(string),"* Vocк intimou %s para um duelo de boxe.",giveplayer);
                            
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                            
format(string,sizeof(string),"* Jogador %s te intimou para uma luta (USE: /aceitar duelo) para aceitar.",sendername);
                            
SendClientMessage(giveplayerid,COLOR_LIGHTBLUE,string);
                            
DuelOffer[giveplayerid] = playerid;
                        }
                        else {
                            
SendClientMessage(playerid,COLOR_GREY," O Jogador estб longe de Vocк,chame ele para perto.!");
                            return 
1;
                        }
                    }
                }
                else {
                    
SendClientMessage(playerid,COLOR_GREY," O Jogador Estб Offline !");
                    return 
1;
                }
            }
            return 
1;
        }
        else if(
strcmp(x_Emprego,"Duelo",true) == 0)
        {
            if(
DuelOffer[playerid] < 999)
            {
                if(
IsPlayerConnected(DuelOffer[playerid]))
                {
                    
format(string,sizeof(string),"* Vocк aceitou a luta de boxe de %s,e irб lutar com %d de saъde.",giveplayer);
                    
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
                    
format(string,sizeof(string),"* %s aceitou seu pedido para a luta de boxe,vocк irб lutar com %d de saъde.",sendername);
                    
SendClientMessage(BoxOffer[playerid],COLOR_LIGHTBLUE,string);
                    
//colete SetPlayerArmour(playerid,100);
                    
SetPlayerArmour(DuelOffer[playerid],100);
                    
// Vida SetPlayerHealth(playerid,100);
                    
SetPlayerHealth(DuelOffer[playerid],100);
                    
SetPlayerInterior(playerid,5);
                    
SetPlayerInterior(DuelOffer[playerid],5);
                    
SetPlayerPos(playerid,294.3664,-134.6830,1004.0625);
                    
SetPlayerFacingAngle(playerid,1004.0625);
                    
SetPlayerPos(DuelOffer[playerid],274.2308,-134.2176,1004.0625);
                    
SetPlayerFacingAngle(DuelOffer[playerid],1004.0625);
                    
TogglePlayerControllable(playerid,0);
                    
TogglePlayerControllable(DuelOffer[playerid],0);
                    
GameTextForPlayer(playerid,"~r~Esperando",3000,1);
                    
GameTextForPlayer(DuelOffer[playerid],"~r~Esperando",3000,1);
                }
                
DuelWaitTime[playerid] = 1;
                
DuelWaitTime[DuelOffer[playerid]] = 1;
                if(
BoxDelay 1) {
                    
BoxDelay 20;
                }
                
InPartida 1;
                
pduel1 DuelOffer[playerid];
                
pduel2 playerid;
                
PlayerBoxing[playerid] = 1;
                
PlayerBoxing[BoxOffer[playerid]] = 1;
                
DuelOffer[playerid] = 999;
                return 
1;
            }
            return 
1;
        }
        else {
            
SendClientMessage(playerid,COLOR_GREY," Ninguem te convidou para uma luta !");
            return 
1;
        } 



Re: Erro sistema de duelo. - zGuigui2068 - 27.03.2016

pawn Код:
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(49779) : error 029: invalid expression, assumed zero
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(49779) : warning 215: expression has no effect
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(49779) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Ta dando esse erro numa linha q eu nem mechi

else if(strcmp(x_Emprego,"mototaxi",true) == 0)
{
if(TransportDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo estб em corrida, USE: /corrida !");
return 1;
}
...


Re: Erro sistema de duelo. - 1sbedx - 27.03.2016

Manda o cуdigo da linha 49779 pra cima.


Re: Erro sistema de duelo. - zGuigui2068 - 27.03.2016

O erro agora й esse... dps q eu usei o tablizador.

pawn Код:
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(50712) : error 029: invalid expression, assumed zero
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(50712) : warning 215: expression has no effect
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(50712) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
a linha й em baixo do duelar й la no "reparar"

pawn Код:
else if(strcmp(x_Emprego,"Duelo",true) == 0)
        {
            if(DuelOffer[playerid] < 999)
            {

                if(IsPlayerConnected(DuelOffer[playerid]))
                {

                    format(string, sizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde.",giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde.",sendername);
                    SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
                    //colete
                    SetPlayerArmour(playerid, 100);
                    SetPlayerArmour(DuelOffer[playerid], 100);
                    // Vida
                    SetPlayerHealth(playerid, 100);
                    SetPlayerHealth(DuelOffer[playerid], 100);
                    SetPlayerInterior(playerid, 5); SetPlayerInterior(DuelOffer[playerid], 5);
                    SetPlayerPos(playerid, 294.3664,-134.6830,1004.0625); SetPlayerFacingAngle(playerid, 1004.0625);
                    SetPlayerPos(DuelOffer[playerid], 274.2308,-134.2176,1004.0625); SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                    TogglePlayerControllable(playerid, 0); TogglePlayerControllable(DuelOffer[playerid], 0);
                    GameTextForPlayer(playerid, "~r~Esperando", 3000, 1); GameTextForPlayer(DuelOffer[playerid], "~r~Esperando", 3000, 1);
                }
                DuelWaitTime[playerid] = 1; DuelWaitTime[DuelOffer[playerid]] = 1;
                if(DuelDelay < 1) { DuelDelay = 20; }
                InPartida = 1;
                pduel1 = DuelOffer[playerid];
                pduel2 = playerid;
                PlayerBoxing[playerid] = 1;
                PlayerBoxing[BoxOffer[playerid]] = 1;
                DuelOffer[playerid] = 999;
                return 1;
            }
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "   Ninguem te convidou para uma luta !");
            return 1;
        }
        else if(strcmp(x_Emprego,"reparo",true) == 0)
        {

            if(RepairOffer[playerid] < 999)
            {

                if(GetGranaRockstar(playerid) > RepairPrice[playerid])
                {

                    if(IsPlayerInAnyVehicle(playerid))
                    {

                        if(IsPlayerConnected(RepairOffer[playerid]))
                        {

                            GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            RepairCar[playerid] = GetPlayerVehicleID(playerid);
                            SetVehicleHealth(RepairCar[playerid], 1000.0);
                            RepairVehicle(RepairCar[playerid]);
                            format(string, sizeof(string), "* O mecвnico %s reparou seu veнculo por R$%d.",giveplayer,RepairPrice[playerid]);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Vocк reparou o veнculo de %s, e R$%d foi adicionado no seu salбrio.",sendername,RepairPrice[playerid]);
                            SendClientMessage(RepairOffer[playerid], COLOR_LIGHTBLUE, string);
                            PlayerInfo[RepairOffer[playerid]][pMechSkill] ++;
                            if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 50)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 2, Agora ele pode adicionar combustivel para qualquer carro."); }
                            else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 100)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 3, Agora ele pode adicionar combustivel para qualquer carro."); }
                            else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 200)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 4, Agora ele pode adicionar combustivel para qualquer carro."); }
                            else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 400)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 5, Agora ele pode adicionar combustivel para qualquer carro."); }
                            PlayerInfo[RepairOffer[playerid]][pSalario] += RepairPrice[playerid];
                            GranaRockstar(playerid, -RepairPrice[playerid]);
                            RepairOffer[playerid] = 999;
                            RepairPrice[playerid] = 0;
                            return 1;
                        }
                        return 1;
                    }
                    return 1;
                }
                else
                {

                    SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo pode permitir o reparo !");
                    return 1;
                }
            }
            else
            {

                SendClientMessage(playerid, COLOR_GREY, "   Falta uma oferta para Vocк reparar o carro !");
                return 1;
            }
        }
        else { return 1; }
    }//not connected
    return 1;
}
~


Re: Erro sistema de duelo. - 1sbedx - 27.03.2016

Quote:
Originally Posted by zGuigui2068
Посмотреть сообщение
O erro agora й esse... dps q eu usei o tablizador.

pawn Код:
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(50712) : error 029: invalid expression, assumed zero
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(50712) : warning 215: expression has no effect
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(50712) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
a linha й em baixo do duelar й la no "reparar"

pawn Код:
else if(strcmp(x_Emprego,"Duelo",true) == 0)
        {
            if(DuelOffer[playerid] < 999)
            {

                if(IsPlayerConnected(DuelOffer[playerid]))
                {

                    format(string, sizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde.",giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde.",sendername);
                    SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
                    //colete
                    SetPlayerArmour(playerid, 100);
                    SetPlayerArmour(DuelOffer[playerid], 100);
                    // Vida
                    SetPlayerHealth(playerid, 100);
                    SetPlayerHealth(DuelOffer[playerid], 100);
                    SetPlayerInterior(playerid, 5); SetPlayerInterior(DuelOffer[playerid], 5);
                    SetPlayerPos(playerid, 294.3664,-134.6830,1004.0625); SetPlayerFacingAngle(playerid, 1004.0625);
                    SetPlayerPos(DuelOffer[playerid], 274.2308,-134.2176,1004.0625); SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                    TogglePlayerControllable(playerid, 0); TogglePlayerControllable(DuelOffer[playerid], 0);
                    GameTextForPlayer(playerid, "~r~Esperando", 3000, 1); GameTextForPlayer(DuelOffer[playerid], "~r~Esperando", 3000, 1);
                }
                DuelWaitTime[playerid] = 1; DuelWaitTime[DuelOffer[playerid]] = 1;
                if(DuelDelay < 1) { DuelDelay = 20; }
                InPartida = 1;
                pduel1 = DuelOffer[playerid];
                pduel2 = playerid;
                PlayerBoxing[playerid] = 1;
                PlayerBoxing[BoxOffer[playerid]] = 1;
                DuelOffer[playerid] = 999;
                return 1;
            }
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "   Ninguem te convidou para uma luta !");
            return 1;
        }
        else if(strcmp(x_Emprego,"reparo",true) == 0)
        {

            if(RepairOffer[playerid] < 999)
            {

                if(GetGranaRockstar(playerid) > RepairPrice[playerid])
                {

                    if(IsPlayerInAnyVehicle(playerid))
                    {

                        if(IsPlayerConnected(RepairOffer[playerid]))
                        {

                            GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            RepairCar[playerid] = GetPlayerVehicleID(playerid);
                            SetVehicleHealth(RepairCar[playerid], 1000.0);
                            RepairVehicle(RepairCar[playerid]);
                            format(string, sizeof(string), "* O mecвnico %s reparou seu veнculo por R$%d.",giveplayer,RepairPrice[playerid]);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Vocк reparou o veнculo de %s, e R$%d foi adicionado no seu salбrio.",sendername,RepairPrice[playerid]);
                            SendClientMessage(RepairOffer[playerid], COLOR_LIGHTBLUE, string);
                            PlayerInfo[RepairOffer[playerid]][pMechSkill] ++;
                            if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 50)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 2, Agora ele pode adicionar combustivel para qualquer carro."); }
                            else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 100)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 3, Agora ele pode adicionar combustivel para qualquer carro."); }
                            else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 200)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 4, Agora ele pode adicionar combustivel para qualquer carro."); }
                            else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 400)
                            {
                                 SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Seu mecanico e cargo 5, Agora ele pode adicionar combustivel para qualquer carro."); }
                            PlayerInfo[RepairOffer[playerid]][pSalario] += RepairPrice[playerid];
                            GranaRockstar(playerid, -RepairPrice[playerid]);
                            RepairOffer[playerid] = 999;
                            RepairPrice[playerid] = 0;
                            return 1;
                        }
                        return 1;
                    }
                    return 1;
                }
                else
                {

                    SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo pode permitir o reparo !");
                    return 1;
                }
            }
            else
            {

                SendClientMessage(playerid, COLOR_GREY, "   Falta uma oferta para Vocк reparar o carro !");
                return 1;
            }
        }
        else { return 1; }
    }//not connected
    return 1;
}
~
Tenta :

PHP код:
        else if (strcmp(x_Emprego"Duelo"true) == 0)
        {
            if (
DuelOffer[playerid] < 999)
            {
                if (
IsPlayerConnected(DuelOffer[playerid]))
                {
                    
format(stringsizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde."giveplayer);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
format(stringsizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde."sendername);
                    
SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUEstring);
                    
//colete
                    
SetPlayerArmour(playerid100);
                    
SetPlayerArmour(DuelOffer[playerid], 100);
                    
// Vida
                    
SetPlayerHealth(playerid100);
                    
SetPlayerHealth(DuelOffer[playerid], 100);
                    
SetPlayerInterior(playerid5);
                    
SetPlayerInterior(DuelOffer[playerid], 5);
                    
SetPlayerPos(playerid294.3664, -134.68301004.0625);
                    
SetPlayerFacingAngle(playerid1004.0625);
                    
SetPlayerPos(DuelOffer[playerid], 274.2308, -134.21761004.0625);
                    
SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                    
TogglePlayerControllable(playerid0);
                    
TogglePlayerControllable(DuelOffer[playerid], 0);
                    
GameTextForPlayer(playerid"~r~Esperando"30001);
                    
GameTextForPlayer(DuelOffer[playerid], "~r~Esperando"30001);
                }
                
DuelWaitTime[playerid] = 1;
                
DuelWaitTime[DuelOffer[playerid]] = 1;
                if (
DuelDelay 1)
                {
                    
DuelDelay 20;
                }
                
InPartida 1;
                
pduel1 DuelOffer[playerid];
                
pduel2 playerid;
                
PlayerBoxing[playerid] = 1;
                
PlayerBoxing[BoxOffer[playerid]] = 1;
                
DuelOffer[playerid] = 999;
                return 
1;
            }
            return 
1;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"   Ninguem te convidou para uma luta !");
            return 
1;
        }
        else if (
strcmp(x_Emprego"reparo"true) == 0)
        {
            if (
RepairOffer[playerid] < 999)
            {
                if (
GetGranaRockstar(playerid) > RepairPrice[playerid])
                {
                    if (
IsPlayerInAnyVehicle(playerid))
                    {
                        if (
IsPlayerConnected(RepairOffer[playerid]))
                        {
                            
GetPlayerName(RepairOffer[playerid], giveplayersizeof(giveplayer));
                            
GetPlayerName(playeridsendernamesizeof(sendername));
                            
RepairCar[playerid] = GetPlayerVehicleID(playerid);
                            
SetVehicleHealth(RepairCar[playerid], 1000.0);
                            
RepairVehicle(RepairCar[playerid]);
                            
format(stringsizeof(string), "* O mecвnico %s reparou seu veнculo por R$%d."giveplayerRepairPrice[playerid]);
                            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                            
format(stringsizeof(string), "* Vocк reparou o veнculo de %s, e R$%d foi adicionado no seu salбrio."sendernameRepairPrice[playerid]);
                            
SendClientMessage(RepairOffer[playerid], COLOR_LIGHTBLUEstring);
                            
PlayerInfo[RepairOffer[playerid]][pMechSkill]++;
                            if (
PlayerInfo[RepairOffer[playerid]][pMechSkill] == 50) {
                                
SendClientMessage(RepairOffer[playerid], COLOR_YELLOW"* Seu mecanico e cargo 2, Agora ele pode adicionar combustivel para qualquer carro.");
                            }
                            else if (
PlayerInfo[RepairOffer[playerid]][pMechSkill] == 100) {
                                
SendClientMessage(RepairOffer[playerid], COLOR_YELLOW"* Seu mecanico e cargo 3, Agora ele pode adicionar combustivel para qualquer carro.");
                            }
                            else if (
PlayerInfo[RepairOffer[playerid]][pMechSkill] == 200) {
                                
SendClientMessage(RepairOffer[playerid], COLOR_YELLOW"* Seu mecanico e cargo 4, Agora ele pode adicionar combustivel para qualquer carro.");
                            }
                            else if (
PlayerInfo[RepairOffer[playerid]][pMechSkill] == 400) {
                                
SendClientMessage(RepairOffer[playerid], COLOR_YELLOW"* Seu mecanico e cargo 5, Agora ele pode adicionar combustivel para qualquer carro.");
                            }
                            
PlayerInfo[RepairOffer[playerid]][pSalario] += RepairPrice[playerid];
                            
GranaRockstar(playerid, -RepairPrice[playerid]);
                            
RepairOffer[playerid] = 999;
                            
RepairPrice[playerid] = 0;
                            return 
1;
                        }
                        return 
1;
                    }
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   Vocк nгo pode permitir o reparo !");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"   Falta uma oferta para Vocк reparar o carro !");
                return 
1;
            }
        }
        else
        {
            return 
1;
        } 



Re: Erro sistema de duelo. - zGuigui2068 - 27.03.2016

nгo deu

ai tentei por em codigo e deu esse warning mas mesmo assim nгo cria o amx...

pawn Код:
C:\Users\Gustavo\Desktop\BSR GM OF - Cуpia\BSR GM OF - Cуpia\Gamemodes\BSR.pwn(20978) : warning 225: unreachable code
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          14296 bytes
Code size:          3353360 bytes
Data size:          3101696 bytes
Stack/heap size:      16384 bytes; estimated max. usage=6990 cells (27960 bytes)
Total requirements: 6485736 bytes

1 Warning.
pawn Код:
if(!strcmp(cmdtext, "/aceitarduelo",true))
{
    if(DuelOffer[playerid] < 999)
    {

        if(IsPlayerConnected(DuelOffer[playerid]))
        {

            format(string, sizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde.",giveplayer);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            format(string, sizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde.",sendername);
            SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
            //colete
            SetPlayerArmour(playerid, 100);
            SetPlayerArmour(DuelOffer[playerid], 100);
            // Vida
            SetPlayerHealth(playerid, 100);
            SetPlayerHealth(DuelOffer[playerid], 100);
            SetPlayerInterior(playerid, 5); SetPlayerInterior(DuelOffer[playerid], 5);
            SetPlayerPos(playerid, 294.3664,-134.6830,1004.0625); SetPlayerFacingAngle(playerid, 1004.0625);
            SetPlayerPos(DuelOffer[playerid], 274.2308,-134.2176,1004.0625); SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
            TogglePlayerControllable(playerid, 0); TogglePlayerControllable(DuelOffer[playerid], 0);
            GameTextForPlayer(playerid, "~r~Esperando", 3000, 1); GameTextForPlayer(DuelOffer[playerid], "~r~Esperando", 3000, 1);
        }
        DuelWaitTime[playerid] = 1; DuelWaitTime[DuelOffer[playerid]] = 1;
        if(DuelDelay < 1) { DuelDelay = 20; }
        InPartida = 1;
        pduel1 = DuelOffer[playerid];
        pduel2 = playerid;
        PlayerBoxing[playerid] = 1;
        PlayerBoxing[BoxOffer[playerid]] = 1;
        DuelOffer[playerid] = 999;
        return 1;
    }
    return 1;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Ninguem te convidou para uma luta !");
    return 1;
}



Re: Erro sistema de duelo. - zGuigui2068 - 27.03.2016

pawn Код:
else if (strcmp(x_Emprego, "Duelo", true) == 0)
        {
            if (DuelOffer[playerid] < 999)
            {
                if (IsPlayerConnected(DuelOffer[playerid]))
                {
                    format(string, sizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde.", sendername);
                    SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
                    //colete
                    SetPlayerArmour(playerid, 100);
                    SetPlayerArmour(DuelOffer[playerid], 100);
                    // Vida
                    SetPlayerHealth(playerid, 100);
                    SetPlayerHealth(DuelOffer[playerid], 100);
                    SetPlayerInterior(playerid, 5);
                    SetPlayerInterior(DuelOffer[playerid], 5);
                    SetPlayerPos(playerid, 294.3664, -134.6830, 1004.0625);
                    SetPlayerFacingAngle(playerid, 1004.0625);
                    SetPlayerPos(DuelOffer[playerid], 274.2308, -134.2176, 1004.0625);
                    SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                    TogglePlayerControllable(playerid, 0);
                    TogglePlayerControllable(DuelOffer[playerid], 0);
                    GameTextForPlayer(playerid, "~r~Esperando", 3000, 1);
                    GameTextForPlayer(DuelOffer[playerid], "~r~Esperando", 3000, 1);
                }
                DuelWaitTime[playerid] = 1;
                DuelWaitTime[DuelOffer[playerid]] = 1;
                if (DuelDelay < 1)
                {
                    DuelDelay = 20;
                }
                InPartida = 1;
                pduel1 = DuelOffer[playerid];
                pduel2 = playerid;
                PlayerBoxing[playerid] = 1;
                PlayerBoxing[BoxOffer[playerid]] = 1;
                DuelOffer[playerid] = 999;
                return 1;
            }
            return 1;
        }
        else
        {

            SendClientMessage(playerid, COLOR_GREY, "   Ninguem te convidou para uma luta !");
            return 1;
        }
Da erro igual o mesmo erro...


Re: Erro sistema de duelo. - 1sbedx - 27.03.2016

Quote:
Originally Posted by zGuigui2068
Посмотреть сообщение
pawn Код:
else if (strcmp(x_Emprego, "Duelo", true) == 0)
        {
            if (DuelOffer[playerid] < 999)
            {
                if (IsPlayerConnected(DuelOffer[playerid]))
                {
                    format(string, sizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                    format(string, sizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde.", sendername);
                    SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
                    //colete
                    SetPlayerArmour(playerid, 100);
                    SetPlayerArmour(DuelOffer[playerid], 100);
                    // Vida
                    SetPlayerHealth(playerid, 100);
                    SetPlayerHealth(DuelOffer[playerid], 100);
                    SetPlayerInterior(playerid, 5);
                    SetPlayerInterior(DuelOffer[playerid], 5);
                    SetPlayerPos(playerid, 294.3664, -134.6830, 1004.0625);
                    SetPlayerFacingAngle(playerid, 1004.0625);
                    SetPlayerPos(DuelOffer[playerid], 274.2308, -134.2176, 1004.0625);
                    SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                    TogglePlayerControllable(playerid, 0);
                    TogglePlayerControllable(DuelOffer[playerid], 0);
                    GameTextForPlayer(playerid, "~r~Esperando", 3000, 1);
                    GameTextForPlayer(DuelOffer[playerid], "~r~Esperando", 3000, 1);
                }
                DuelWaitTime[playerid] = 1;
                DuelWaitTime[DuelOffer[playerid]] = 1;
                if (DuelDelay < 1)
                {
                    DuelDelay = 20;
                }
                InPartida = 1;
                pduel1 = DuelOffer[playerid];
                pduel2 = playerid;
                PlayerBoxing[playerid] = 1;
                PlayerBoxing[BoxOffer[playerid]] = 1;
                DuelOffer[playerid] = 999;
                return 1;
            }
            return 1;
        }
        else
        {

            SendClientMessage(playerid, COLOR_GREY, "   Ninguem te convidou para uma luta !");
            return 1;
        }
Da erro igual o mesmo erro...
Tenta assim ...

PHP код:
        else if (strcmp(x_Emprego"Duelo"true) == 0)
        {
            if (
DuelOffer[playerid] < 999)
            {
                if (
IsPlayerConnected(DuelOffer[playerid]))
                {
                    
format(stringsizeof(string), "* Vocк aceitou a luta de boxe de %s, e irб lutar com %d de saъde."giveplayer);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
format(stringsizeof(string), "* %s aceitou seu pedido para a luta de boxe, vocк irб lutar com %d de saъde."sendername);
                    
SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUEstring);
                    
//colete
                    
SetPlayerArmour(playerid100);
                    
SetPlayerArmour(DuelOffer[playerid], 100);
                    
// Vida
                    
SetPlayerHealth(playerid100);
                    
SetPlayerHealth(DuelOffer[playerid], 100);
                    
SetPlayerInterior(playerid5);
                    
SetPlayerInterior(DuelOffer[playerid], 5);
                    
SetPlayerPos(playerid294.3664, -134.68301004.0625);
                    
SetPlayerFacingAngle(playerid1004.0625);
                    
SetPlayerPos(DuelOffer[playerid], 274.2308, -134.21761004.0625);
                    
SetPlayerFacingAngle(DuelOffer[playerid], 1004.0625);
                    
TogglePlayerControllable(playerid0);
                    
TogglePlayerControllable(DuelOffer[playerid], 0);
                    
GameTextForPlayer(playerid"~r~Esperando"30001);
                    
GameTextForPlayer(DuelOffer[playerid], "~r~Esperando"30001);
                }
                
DuelWaitTime[playerid] = 1;
                
DuelWaitTime[DuelOffer[playerid]] = 1;
                if (
DuelDelay 1)
                {
                    
DuelDelay 20;
                }
                
InPartida 1;
                
pduel1 DuelOffer[playerid];
                
pduel2 playerid;
                
PlayerBoxing[playerid] = 1;
                
PlayerBoxing[BoxOffer[playerid]] = 1;
                
DuelOffer[playerid] = 999;
                return 
1;
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"   Ninguem te convidou para uma luta !");
            return 
1;
        }