SA-MP Forums Archive
[Duda] Hacer un anuncio con box - 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: [Duda] Hacer un anuncio con box (/showthread.php?tid=480105)



[Duda] Hacer un anuncio con box - uardo12 - 08.12.2013

Quisiera como saber como hacer un comando /Announce con este BOx

PHP код:
    Textdraw0 TextDrawCreate(489.000000290.000000"New Textdraw");
    
TextDrawBackgroundColor(Textdraw0255);
    
TextDrawFont(Textdraw01);
    
TextDrawLetterSize(Textdraw00.4100001.300000);
    
TextDrawColor(Textdraw0, -680329001);
    
TextDrawSetOutline(Textdraw00);
    
TextDrawSetProportional(Textdraw01);
    
TextDrawSetShadow(Textdraw01);
    
TextDrawUseBox(Textdraw01);
    
TextDrawBoxColor(Textdraw06553389);
    
TextDrawTextSize(Textdraw0173.00000060.000000);
    
TextDrawSetSelectable(Textdraw00); 



Respuesta: [Duda] Hacer un anuncio con box - Zume - 08.12.2013

Para que es /announce? xd


Respuesta: [Duda] Hacer un anuncio con box - benjas09 - 09.12.2013

anuncio


Respuesta: [Duda] Hacer un anuncio con box - Zume - 09.12.2013

Quote:
Originally Posted by benjas09
Посмотреть сообщение
anuncio
pawn Код:
new Text:Textdraw0;
public OnGameModeInit()
{
    Textdraw0 = TextDrawCreate(489.000000, 290.000000, "New Textdraw");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.410000, 1.300000);
    TextDrawColor(Textdraw0, -680329001);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 6553389);
    TextDrawTextSize(Textdraw0, 173.000000, 60.000000);
    TextDrawSetSelectable(Textdraw0, 0);
    return 1;
}

CMD:anuncio(playerid, params[])
{
    new string[64];
    if(sscanf(params,"s[64]",params[0])) return SendClientMessage(playerid,-1, "- /anuncio <Texto>");
   
    format(string, sizeof(string), "%s", params[0]);
    TextDrawSetString(Textdraw0, string);

    TextDrawHideForAll(Textdraw0);
    TextDrawShowForAll(Textdraw0);
    return 1;
}



Re: [Duda] Hacer un anuncio con box - uardo12 - 10.12.2013

lo puse en mi sistema vip no da ningun errore pero cuando lo pruebo no funciona


Respuesta: [Duda] Hacer un anuncio con box - OTACON - 10.12.2013



pawn Код:
#include <a_samp>
#include <zcmd> //https://sampforum.blast.hk/showthread.php?tid=91354
#include <sscanf2> //https://sampforum.blast.hk/showthread.php?tid=120356
new Text:Mensaje;
public OnFilterScriptInit(){
    Mensaje = TextDrawCreate(178.000000, 289.000000, "hola este es el texto en el box. :)");
    TextDrawBackgroundColor(Mensaje, 255);
    TextDrawFont(Mensaje, 1);
    TextDrawLetterSize(Mensaje, 0.500000, 1.400000);
    TextDrawColor(Mensaje, -680329001);
    TextDrawSetOutline(Mensaje, 0);
    TextDrawSetProportional(Mensaje, 1);
    TextDrawSetShadow(Mensaje, 1);
    TextDrawUseBox(Mensaje, 1);
    TextDrawBoxColor(Mensaje, 6553389);
    TextDrawTextSize(Mensaje, 485.000000, 211.000000);
    TextDrawSetSelectable(Mensaje, false);
    return true;
}
public OnPlayerSpawn(playerid){
    TextDrawShowForPlayer(playerid,Mensaje);
    return true;
}
public OnPlayerDisconnect(playerid, reason){
    TextDrawHideForPlayer(playerid,Mensaje);
    return true;
}
COMMAND:anuncio(playerid, params[]){
    new data[200];
    if(sscanf(params,"s[200]",params[0])) return SendClientMessage(playerid,-1, "INFO: escribe /anuncio [texto]");
    format(data,sizeof(data),"%s",params[0]);
    TextDrawSetString(Mensaje,data);
    return true;
}



Respuesta: [Duda] Hacer un anuncio con box - uardo12 - 19.12.2013

Quote:
Originally Posted by OTACON
Посмотреть сообщение


pawn Код:
#include <a_samp>
#include <zcmd> //https://sampforum.blast.hk/showthread.php?tid=91354
#include <sscanf2> //https://sampforum.blast.hk/showthread.php?tid=120356
new Text:Mensaje;
public OnFilterScriptInit(){
    Mensaje = TextDrawCreate(178.000000, 289.000000, "hola este es el texto en el box. :)");
    TextDrawBackgroundColor(Mensaje, 255);
    TextDrawFont(Mensaje, 1);
    TextDrawLetterSize(Mensaje, 0.500000, 1.400000);
    TextDrawColor(Mensaje, -680329001);
    TextDrawSetOutline(Mensaje, 0);
    TextDrawSetProportional(Mensaje, 1);
    TextDrawSetShadow(Mensaje, 1);
    TextDrawUseBox(Mensaje, 1);
    TextDrawBoxColor(Mensaje, 6553389);
    TextDrawTextSize(Mensaje, 485.000000, 211.000000);
    TextDrawSetSelectable(Mensaje, false);
    return true;
}
public OnPlayerSpawn(playerid){
    TextDrawShowForPlayer(playerid,Mensaje);
    return true;
}
public OnPlayerDisconnect(playerid, reason){
    TextDrawHideForPlayer(playerid,Mensaje);
    return true;
}
COMMAND:anuncio(playerid, params[]){
    new data[200];
    if(sscanf(params,"s[200]",params[0])) return SendClientMessage(playerid,-1, "INFO: escribe /anuncio [texto]");
    format(data,sizeof(data),"%s",params[0]);
    TextDrawSetString(Mensaje,data);
    return true;
}
ERROR :/
PHP код:
U:\server\my server\comandos\Sistema VIP\filterscripts\edit for my\Vip.pwn(52) : error 021symbol already defined"Mensaje"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Y ME DICE QUE ES DE ESTA LINEA
PHP код:
new Text:Mensaje



Respuesta: [Duda] Hacer un anuncio con box - Adoniiz - 19.12.2013

ya esta definido la variable "Mensaje"


Respuesta: [Duda] Hacer un anuncio con box - uardo12 - 19.12.2013

Quote:
Originally Posted by Adoniiz
Посмотреть сообщение
ya esta definido la variable "Mensaje"
Tons porq sale error


Respuesta: [Duda] Hacer un anuncio con box - OTACON - 19.12.2013

por que tienes 2 veces new Text:Mensaje;.