[Ajuda] Colocar comando em algum TextDraw
#16

pawn Code:
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 !
Mas eu posso digitar meu texto sem ter que reiniciar ou sair do serve? Tipo se eu digitar /cmd [TEXTO] ai aparece essa textdraw com o [TEXTO] que eu digitei?
Obrigado desde jб!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)