[Pedido] Sistema de mensagens .
#4

FS bom, 60 SEG para mandar o anuncio e o texto й escrito em DIALOG.
Quote:

#include <a_samp>
#vintedois.samp
#include <zcmd>

new Anunciou;

new Nome[24];
new Fala[256];

public OnPlayerDialogResponse(playerid,dialogid,response, listitem,inputtext[])
{
if(dialogid == 1457)
{
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,1457,"Anuncio","Coloque o Texto do Anuncio","Anunciar","Cancelar");
return 1;
}
else
{
GetPlayerName(playerid,Nome,sizeof(Nome));
format(Fala,sizeof(Fala),"Anuncio: %s, por: %s, ID %d.",inputtext,Nome,playerid);
SetTimer("PodeAnunciar",60000,0);
return 1;
}
}
else
{
Anunciou = 0;
return 1;
}
}
return 1;
}

forward PodeAnunciar();

public PodeAnunciar()
{
SendClientMessageToAll(0xBFBFBFAA,"Anuncio liberado, use /anuncio.");
Anunciou = 0;
return 1;
}

CMD:anuncio(playerid,params[])
{
if(Anunciou == 0)
{
Anunciou = 1;
ShowPlayerDialog(playerid,1457,"Anuncio","Coloque o Texto do Anuncio","Anunciar","Cancelar");
return 1;
}
else
{
SendClientMessage(playerid,0xBFBFBFAA,"Jб anunciaram, espere 1 minuto.");
return 1;
}
}

Reply


Messages In This Thread
Sistema de mensagens . - by AnjooGangz - 09.10.2016, 00:43
Re: Sistema de mensagens . - by Whoo - 09.10.2016, 01:01
Re: Sistema de mensagens . - by Carlos001 - 09.10.2016, 01:15
Re: Sistema de mensagens . - by VinteDois - 16.10.2016, 08:57

Forum Jump:


Users browsing this thread: 1 Guest(s)