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