CMD:anunciar(playerid, params[])
{
new texto[50], string[80];
if(sscanf(params,"s",texto)) return SendClientMessage(playerid, -1, #Use: /anunciar [texto]);
format(string, sizeof(string),"%s",texto);
GameTextForAll(string, 5000, 3);
return 1;
}
Eu quero fazer meu propio TextDraw nao usar o GameTextForAll e um Style que ja tem!
|
CMD:anunciar(playerid, params[])
{
new texto[50], string[80];
if(sscanf(params,"s",texto)) return SendClientMessage(playerid, -1, #Use: /anunciar [texto]);
format(string, sizeof(string),"%s",texto);
TextDrawSetString(NOMEDATEXTDRAW, texto)
return 1;
}
й simple, faзa a mesma coisa que o amigo fez sу que inves de GameText usa TextDrawSetString pawn Code: CMD:anunciar(playerid, params[]) { new texto[50], string[80]; if(sscanf(params,"s",texto)) return SendClientMessage(playerid, -1, #Use: /anunciar [texto]); format(string, sizeof(string),"%s",texto); TextDrawSetString(NOMEDATEXTDRAW, texto) return 1; } lembra de criar ela '-'
new text:Textdraw1;
//mude o nome dela toda para TextdrawBlaBla
//e pronto '-'
D:\TenhoUmaDuvida\Curioso!\Curioso!\pawno\include\PPC_PlayerCommands.inc(5030) : warning 213: tag mismatch
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(465) : error 022: must be lvalue (non-constant)
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(466) : warning 213: tag mismatch
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(467) : warning 213: tag mismatch
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(468) : warning 213: tag mismatch
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(469) : warning 213: tag mismatch
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(470) : warning 213: tag mismatch
D:\TenhoUmaDuvida\Curioso!\Curioso!\gamemodes\GMCurioso!.pwn(471) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
CMD:anunciar(playerid, params[])
{
new texto[50], string[80];
if(sscanf(params,"s",texto)) return SendClientMessage(playerid, -1, #Use: /anunciar [texto]);
format(string, sizeof(string),"%s",texto);
TextDrawSetString(MinhaTextDraw, texto);
return 1;
}
#include <a_samp>
#include <dini>
TOPO
new Text:TxDNotificador;
#define COLOUR_INFORMACAO 0xFF0000FF
//Aqui abaixo vocк poderб mudar o tamanho, posiзгo,cor,fonte, e etc.
//OnGameModeInit
TxDNotificador = TextDrawCreate(135.000000, 410.000000, " ");
TextDrawBackgroundColor(TxDNotificador, 255);
TextDrawFont(TxDNotificador, 1);
TextDrawLetterSize(TxDNotificador, 0.270000, 1.200000);
//TextDrawColor(TxDNotificador, 16711935);
TextDrawSetOutline(TxDNotificador, 1);
TextDrawSetProportional(TxDNotificador, 1);
//OnPlayerSpawn
TextDrawShowForPlayer(playerid, TxDNotificador);
//OnPlayerDeath
TextDrawHideForPlayer(playerid, TxDNotificador);
//PORLБPROFINAL OU MEIO
stock LoadConfig()
{
TextDrawSetString(TxDNotificador, dini_Get("TextDrawNotificar.ini","notificar"));//TextDraw Notificar
//OnPlayerCommandText
dcmd_notificar(playerid,params[]){
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 4) return SendClientMessage(playerid,COLOUR_ERRO,StringTable[8]);
if(!strlen(params)){CallRemoteFunction("Notificar","s"," "); return 1;}
if(StringTXTBugado(params)) return SendClientMessage(playerid,COLOUR_ERRO,"[ERRO]: Seu texto estб com erros e foi bloqueado para evitar crash's");
CallRemoteFunction("CMDMessageToAdmins","is",playerid,"NOTIFICAR");
CallRemoteFunction("Notificar","s",params);
return 1;}
if(strcmp("/notpiscar", cmdtext, true) == 0) {
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1) return SendClientMessage(playerid,0x66CCFFAA,StringTable[8]);
if(NotificarBlinking == false){
NotificarBlinking = true;
KillTimer(TimerNotBlinker);
TimerNotBlinker = SetTimer("NotificarBlink",250, 1);
SendClientMessage(playerid, COLOUR_INFORMACAO, "[INFO]: Notificar piscando");
}else{
NotificarBlinking = false;
KillTimer(TimerNotBlinker);
TextDrawShowForAll(TxDNotificador);
SendClientMessage(playerid, COLOUR_INFORMACAO, "[INFO]: Notificar estбtico");}
return 1;}
//MEIO OU FINAL
forward NotRemove();
public NotRemove()
{
TextDrawSetString(TxDNotificador, " ");
return 1;
}
forward NotificarEx(string[],tempo);
public NotificarEx(string[],tempo)
{
if(tempo < 0){TextDrawSetString(TxDNotificador, Notificando),dini_Set("TextDrawNotificar.ini","notificar",string);return 1;}
if(tempo > 0){SetTimer("NotRemoveEx", tempo, 0);}
TextDrawSetString(TxDNotificador, string);
dini_Set("TextDrawNotificar.ini","notificar",string);
return 1;
}
forward NotificarBlink();
public NotificarBlink()
{
if(NotBlinker == true){
NotBlinker = false;
TextDrawHideForAll(TxDNotificador);
}else{
NotBlinker = true;
TextDrawShowForAll(TxDNotificador);}
return 1;
}
forward Notificar(string[]);
public Notificar(string[])
{
format(Notificando, sizeof(Notificando), "%s",string);
TextDrawSetString(TxDNotificador, string);
dini_Set("TextDrawNotificar.ini","notificar",string);
return 1;
}
forward NotRemoveEx();
public NotRemoveEx()
{
TextDrawSetString(TxDNotificador, Notificando);
return 1;
}
forward NotRemove();
public NotRemove()
{
TextDrawSetString(TxDNotificador, " ");
return 1;
}
Entгo meu amigo , eu acho que й meio que isso abaixo:
pawn Code:
#include <a_samp>
#include <dini>
TOPO
new Text:TxDNotificador;
#define COLOUR_INFORMACAO 0xFF0000FF
//Aqui abaixo vocк poderб mudar o tamanho, posiзгo,cor,fonte, e etc.
//OnGameModeInit
TxDNotificador = TextDrawCreate(135.000000, 410.000000, " ");
TextDrawBackgroundColor(TxDNotificador, 255);
TextDrawFont(TxDNotificador, 1);
TextDrawLetterSize(TxDNotificador, 0.270000, 1.200000);
//TextDrawColor(TxDNotificador, 16711935);
TextDrawSetOutline(TxDNotificador, 1);
TextDrawSetProportional(TxDNotificador, 1);
//OnPlayerSpawn
TextDrawShowForPlayer(playerid, TxDNotificador);
//OnPlayerDeath
TextDrawHideForPlayer(playerid, TxDNotificador);
//PORLБPROFINAL OU MEIO
stock LoadConfig()
{
TextDrawSetString(TxDNotificador, dini_Get("TextDrawNotificar.ini","notificar"));//TextDraw Notificar
//OnPlayerCommandText
dcmd_notificar(playerid,params[]){
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 4) return SendClientMessage(playerid,COLOUR_ERRO,StringTable[8]);
if(!strlen(params)){CallRemoteFunction("Notificar","s"," "); return 1;}
if(StringTXTBugado(params)) return SendClientMessage(playerid,COLOUR_ERRO,"[ERRO]: Seu texto estб com erros e foi bloqueado para evitar crash's");
CallRemoteFunction("CMDMessageToAdmins","is",playerid,"NOTIFICAR");
CallRemoteFunction("Notificar","s",params);
return 1;}
if(strcmp("/notpiscar", cmdtext, true) == 0) {
if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1) return SendClientMessage(playerid,0x66CCFFAA,StringTable[8]);
if(NotificarBlinking == false){
NotificarBlinking = true;
KillTimer(TimerNotBlinker);
TimerNotBlinker = SetTimer("NotificarBlink",250, 1);
SendClientMessage(playerid, COLOUR_INFORMACAO, "[INFO]: Notificar piscando");
}else{
NotificarBlinking = false;
KillTimer(TimerNotBlinker);
TextDrawShowForAll(TxDNotificador);
SendClientMessage(playerid, COLOUR_INFORMACAO, "[INFO]: Notificar estбtico");}
return 1;}
//MEIO OU FINAL
forward NotRemove();
public NotRemove()
{
TextDrawSetString(TxDNotificador, " ");
return 1;
}
forward NotificarEx(string[],tempo);
public NotificarEx(string[],tempo)
{
if(tempo < 0){TextDrawSetString(TxDNotificador, Notificando),dini_Set("TextDrawNotificar.ini","notificar",string);return 1;}
if(tempo > 0){SetTimer("NotRemoveEx", tempo, 0);}
TextDrawSetString(TxDNotificador, string);
dini_Set("TextDrawNotificar.ini","notificar",string);
return 1;
}
forward NotificarBlink();
public NotificarBlink()
{
if(NotBlinker == true){
NotBlinker = false;
TextDrawHideForAll(TxDNotificador);
}else{
NotBlinker = true;
TextDrawShowForAll(TxDNotificador);}
return 1;
}
forward Notificar(string[]);
public Notificar(string[])
{
format(Notificando, sizeof(Notificando), "%s",string);
TextDrawSetString(TxDNotificador, string);
dini_Set("TextDrawNotificar.ini","notificar",string);
return 1;
}
forward NotRemoveEx();
public NotRemoveEx()
{
TextDrawSetString(TxDNotificador, Notificando);
return 1;
}
forward NotRemove();
public NotRemove()
{
TextDrawSetString(TxDNotificador, " ");
return 1;
}
Aqui estб um print:
Obs: Download da pasta aqui POR NA SCRIPTFILES
Nгo testei , qualquer dъvida pode me chamar , o tamanho , posiзгo , fonte , etc pode ser alterado.
Й isso !