[Duda] Hacer un anuncio con box
#1

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); 
Reply
#2

Para que es /announce? xd
Reply
#3

anuncio
Reply
#4

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;
}
Reply
#5

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



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;
}
Reply
#7

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
Reply
#8

ya esta definido la variable "Mensaje"
Reply
#9

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

por que tienes 2 veces new Text:Mensaje;.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)