SA-MP Forums Archive
Ayuda colores XD - 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: Ayuda colores XD (/showthread.php?tid=158322)



Ayuda colores XD - ConecCionMex - 09.07.2010

tewngo esto

pawn Код:
new Mensajes[][] =
{
    "Mensaje 1",
    "Mensaje 2",
    "Mensaje 3",
    "Mensaje 4",
    "Mensaje 5",
    "Mensaje 6",
    "Mensaje 7"
};

new CMensajes[][] =
{
    Azul,
    Rojo,
    Verde,
    Amarillo,
    Naranja
};

SetTimer("AMensajes",300000,1);

forward AMensajes();
public AMensajes()
{
        SendClientMessageToAll(CMensajes, Mensajes[random(sizeof(Mensajes))]);//Linea del Error
        return 1;
}

pero me sale error

Код:
C:\Documents and Settings\BlackCrystal™\Mis documentos\SSA\filterscripts\Sadmin.pwn(1825) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Como le hago para qe al enviar un mensaje tambien envie en colores diferentes aa?


Respuesta: Ayuda colores XD - Cesar_Biker - 09.07.2010

pawn Код:
SendClientMessageToAll(CMensajes[random(sizeof(CMensajes))], Mensajes[random(sizeof(Mensajes))]);//Linea del Error
No puedes poner un array en el lugar de un hexadecimal.


Re: Ayuda colores XD - ConecCionMex - 09.07.2010

Lo vere Me sige saliendo el error :/


Re: Ayuda colores XD - laborgward - 09.07.2010

proba asi:
pawn Код:
new Mensajes[][] =
{
    "Mensaje 1",
    "Mensaje 2",
    "Mensaje 3",
    "Mensaje 4",
    "Mensaje 5",
    "Mensaje 6",
    "Mensaje 7"
};

new CMensajes[5][3] =
{
    Azul,
    Rojo,
    Verde,
    Amarillo,
    Naranja
};

forward AMensajes();
public AMensajes()
{
    new rand = random(sizeof(CMensajes));
    SendClientMessageToAll(CMensajes[rand][0],Mensajes[random(sizeof(Mensajes))]);
    return 1;
}
no lo probe pero me imagino que funciona

salu2


Re: Ayuda colores XD - ConecCionMex - 09.07.2010

Na ya me ayudo Mr Death Gracias igual larborg
Cierren Tema