SA-MP Forums Archive
Ayudita por favor - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Ayudita por favor (/showthread.php?tid=550038)



Ayudita por favor - Zodiaco - 10.12.2014

Hola amigos del samp me podrian dar una ayudita.. le cambie a una parte de mi funcion esto GameTextForPlayer a GameTextForAll para que lo vean todos los players despues que se hace un duelo pero me sale un error!!!

pawn Код:
C:\Users\User\Desktop\LADMIN(1259) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
La funcion sin modificar
pawn Код:
for (new j=0; j<= MAX_PLAYERS; j++)
               {
                   if (ViendoDuelo[j] == i)
                   {
                       new str2[256];
                       format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
                     GameTextForPlayer(j,str2,5000,0); // <<<--- esto quiero cambiar por GameTextForAll pero me da el error
                     ViendoDuelo[j] =-1;
                   }
               }
            }

Cuando lo modifico por GameTextForAll me da el error de arriba

pawn Код:
for (new j=0; j<= MAX_PLAYERS; j++)
               {
                   if (ViendoDuelo[j] == i)
                   {
                       new str2[256];
                       format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
                     GameTextForAll(j,str2,5000,3); // <<<--- esto
                     ViendoDuelo[j] =-1;
                   }
               }
            }
saludos


Re: Ayudita por favor - JuanStone - 10.12.2014

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(ViendoDuelo[i] == 1) // error ?? == i ??
        {
            new str2[256];
            format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
            GameTextForPlayer(i, str2, 5000, 3); // si usas forall no puedes definir a quien despuйs, usa asн.
            ViendoDuelo[i] =-1;
        }
    }
}
pawn Код:
for (new j=0; j<= MAX_PLAYERS; j++)
               {
                   if (ViendoDuelo[j] == i)
                   {
                       new str2[256];
                       format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
                     GameTextForPlayer(j, str2,5000,3); // <<<--- esto
                     ViendoDuelo[j] =-1;
                   }
               }
            }



Re: Ayudita por favor - Adejair_Junior - 10.12.2014

Params GameTextForAll const string[] time style

pawn Код:
for(new j= 0; i <= MAX_PLAYERS; j++)
    {
        if(ViendoDuelo[j] == i)
        {
            new str2[256];
            format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
            GameTextForAll(str2,5000,3);
            ViendoDuelo[j] =-1;
        }
    }
}



Respuesta: Re: Ayudita por favor - Zodiaco - 10.12.2014

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(ViendoDuelo[i] == 1) // error ?? == i ??
        {
            new str2[256];
            format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
            GameTextForPlayer(i, str2, 5000, 3); // si usas forall no puedes definir a quien despuйs, usa asн.
            ViendoDuelo[i] =-1;
        }
    }
}
pawn Код:
for (new j=0; j<= MAX_PLAYERS; j++)
               {
                   if (ViendoDuelo[j] == i)
                   {
                       new str2[256];
                       format(str2,sizeof(str2),"~r~%s ~w~es el ganador del duelo",PlayerName2(Duelos[i][DesafiadoId]));
                     GameTextForPlayer(j, str2,5000,3); // <<<--- esto
                     ViendoDuelo[j] =-1;
                   }
               }
            }
Ok muchas gracias comprendido n_n