SA-MP Forums Archive
como hacer este ann! - 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: como hacer este ann! (/showthread.php?tid=285214)



como hacer este ann! - OziiL - 23.09.2011

Hola amigos soy nuevo aqui y queria ver si me podian ayudar con este script que consiste en hacer un /ann text draw con fondo asi como veran en la imagen!

http://imageshack.us/photo/my-images/828/annv.png/
PD: Ahi puse el link de la imagen porque no se que pasa que no se ve cualquier cosa me avisan

si alguien lo sabe estare agradecido saludos!


Re: como hacer este ann! - admantis - 23.09.2011

No se ve la imagen.


Respuesta: como hacer este ann! - TiNcH010 - 23.09.2011

Primero baja el TextDrawEditor de Zamaroht.
Despues haces el comando con SetTextDrawString.

Te recomiendo que primero hagas lo que dije primero y luego te sigo ayudando.


Re: como hacer este ann! - OziiL - 24.09.2011

amigo trate de hacer un intento pero ni ґD: mira

Код:
if(!strcmp(cmdtext, "/an", true)){
   if(!strlen(params)) return SendClientMessage(playerid,red,"USE: /an <texto>");
    return TextDrawSetString(params,newtext,);
    TextDrawShowForAll(Textdr0);
	TextDrawShowForAll(Textdr1);
	TextDrawShowForAll(Textdr2);
	SetTimer("ChauAnMinigun", 10000, 1);
return 1;
}

public OnGameModeInit()
{
// Create the textdraws:
	Textdr0 = TextDrawCreate(491.000000, 154.000000, "_");
	TextDrawBackgroundColor(Textdr0, 255);
	TextDrawFont(Textdraw0, 1);
	TextDrawLetterSize(Textdr0, 0.500000, 8.000000);
	TextDrawColor(Textdr0, -1);
	TextDrawSetOutline(Textdr0, 0);
	TextDrawSetProportional(Textdr0, 1);
	TextDrawSetShadow(Textdr0, 1);
	TextDrawUseBox(Textdr0, 1);
	TextDrawBoxColor(Textdr0, 136);
	TextDrawTextSize(Textdr0, 170.000000, 20.000000);

	Textdr1 = TextDrawCreate(190.000000, 160.000000, "Evento:");
	TextDrawBackgroundColor(Textdr1, 255);
	TextDrawFont(Textdr1, 3);
	TextDrawLetterSize(Textdr1, 0.500000, 1.000000);
	TextDrawColor(Textdr1, -1);
	TextDrawSetOutline(Textdr1, 1);
	TextDrawSetProportional(Textdr1, 1);

	Textdr2 = TextDrawCreate(181.000000, 184.000000, "_");
	TextDrawBackgroundColor(Textdr2, 255);
	TextDrawFont(Textdr2, 2);
	TextDrawLetterSize(Textdr2, 0.780000, 2.199999);
	TextDrawColor(Textdr2, -1);
	TextDrawSetOutline(Textdr2, 1);
	TextDrawSetProportional(Textdr2, 1);
y asi mismo me sigue tirando errores como 4!


Respuesta: como hacer este ann! - leaNN! - 24.09.2011

pawn Код:
CMD:ann(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid,red,"USE: /ann <texto>");
    TextDrawSetString(params, newtext);
    TextDrawShowForAll(Textdr0);
    TextDrawShowForAll(Textdr1);
    TextDrawShowForAll(Textdr2);
    SetTimer("ChauAnMinigun", 10000, 1);
    return 1;
}

public OnGameModeInit()
{
// Create the textdraws:
    Textdr0 = TextDrawCreate(491.000000, 154.000000, "_");
    TextDrawBackgroundColor(Textdr0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdr0, 0.500000, 8.000000);
    TextDrawColor(Textdr0, -1);
    TextDrawSetOutline(Textdr0, 0);
    TextDrawSetProportional(Textdr0, 1);
    TextDrawSetShadow(Textdr0, 1);
    TextDrawUseBox(Textdr0, 1);
    TextDrawBoxColor(Textdr0, 136);
    TextDrawTextSize(Textdr0, 170.000000, 20.000000);

    Textdr1 = TextDrawCreate(190.000000, 160.000000, "Evento:");
    TextDrawBackgroundColor(Textdr1, 255);
    TextDrawFont(Textdr1, 3);
    TextDrawLetterSize(Textdr1, 0.500000, 1.000000);
    TextDrawColor(Textdr1, -1);
    TextDrawSetOutline(Textdr1, 1);
    TextDrawSetProportional(Textdr1, 1);

    Textdr2 = TextDrawCreate(181.000000, 184.000000, "_");
    TextDrawBackgroundColor(Textdr2, 255);
    TextDrawFont(Textdr2, 2);
    TextDrawLetterSize(Textdr2, 0.780000, 2.199999);
    TextDrawColor(Textdr2, -1);
    TextDrawSetOutline(Textdr2, 1);
    TextDrawSetProportional(Textdr2, 1);
    return 1;
}
Conste que no se usar TextDraw's, pero solucione mas de un error, creo.

PD: Cuando usas comandos con strcmp, no existe "params"...


Re: como hacer este ann! - OziiL - 24.09.2011

dahhhh directamente ni copila el pawno deja de funcionar!


Respuesta: como hacer este ann! - VetoBarrera - 24.09.2011

pawn Код:
if(strcmp(cmd, "/an", true) == 0)
       {
            new string[128];
           for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if(IsPlayerConnected(i))
        {
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[200];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "ESCRIBE: /an [Texto]");
                return 1;
            }
                        TextDrawShowForPlayer(i, Textdr0);
                        TextDrawShowForPlayer(i, Textdr1);
                        TextDrawShowForPlayer(i, Textdr2);
                        SetTimer("ChauAnMinigun", 10000, 1);
            format(string, sizeof(string), "%s", result);
                TextDrawSetString(Textdr1, string);
       
             }
           
       }    
        return 1;
    }
Casualmente estaba haciendo un sistema parecido pero bueno diferente forma y para diferente uso, se que ese te ira de maravilla, aunque no es lo mismo pero ya se jugar con esto jaja si no te sirve me dices


Re: como hacer este ann! - OziiL - 24.09.2011

Amigo me recontra sirvio!!!!!!!!!!!!muchisimas gracias saludos!!!!!


Respuesta: Re: como hacer este ann! - VetoBarrera - 24.09.2011

Quote:
Originally Posted by OziiL
Посмотреть сообщение
Amigo me recontra sirvio!!!!!!!!!!!!muchisimas gracias saludos!!!!!
Ok Amigo me alegra, cualquier otra cosa no dudes en preguntar pues aca la gente de Forum Samp te ayudaremos en todo.


Orgullosamente Colombiano


Re: como hacer este ann! - OziiL - 24.09.2011

ahh oye amigo surgio un problema al momento de subirlo al host al gm al querer poner el comando en el host
el comando me dice como si pusiera solo /an3 y no el texto de lo contrario sin el host me anda perfecto no se porque! :S
saludos!