[Pedido] Ann com TextDraw -
Lucas_HenryK - 10.04.2012
Bom gente eu vi um fs spanhol com anuncio em text draw so ele se move eu queria fazer um igual mais sme ser mover queria igual o /ann /cnn de outros servers mais com text draw em baixo da tela so que um pouco mais em cima no meio olhem a imagem e veja como й mais ou menos, se alguem me ajudar tera minha reputation!
Re: [Pedido] Ann com TextDraw -
Ricop522 - 10.04.2012
Cria o textdraw e usa a funзгo TextDrawSetString!
Use Zamaroth para criar a TD : )
Re: [Pedido] Ann com TextDraw -
Lucas_HenryK - 10.04.2012
й mais jб me falaram disso mais nгo consegui...
Re: [Pedido] Ann com TextDraw -
Ricop522 - 10.04.2012
Nгo conseguiu como? clicar na opзгo criar textdraw, posicionar na tela, exportar e depois colocar no gamemode? rs
Tutorialzinho pra vocк:
https://sampforum.blast.hk/showthread.php?tid=170172
Re: [Pedido] Ann com TextDraw -
Lucas_HenryK - 10.04.2012
Mais tipo cara eu quero assim /anuncio [texto] aparece como text draw o anuncio nгo em GameText ta ligado?
Re: [Pedido] Ann com TextDraw -
Delete_ - 10.04.2012
onplayercomm...
pawn Код:
new cmd[128], string[128], tmp[128], idx;
cmd = strtok(cmdtext, idx);
pawn Код:
if(strcmp(cmd, "/cnn", true) == 0)
if(PlayerInfo[playerid][Level] >= 2) {
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[70];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid,-1,"Use: /cnn [mensagem]");
if(strlen(result) > 40) return SendClientMessage(playerid,-1,"O mбximo de caracteres permitido й 40");
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"Admin %s: ~y~%s", name, result);
textdrawtoall = TextDrawCreate(325.000000, 394.000000, string);
TextDrawAlignment(textdrawtoall, 2);
TextDrawBackgroundColor(textdrawtoall, 255);
TextDrawFont(textdrawtoall, 1);
TextDrawLetterSize(textdrawtoall, 0.399999, 3.199999);
TextDrawColor(textdrawtoall, 16711935);
TextDrawSetOutline(textdrawtoall, 1);
TextDrawSetProportional(textdrawtoall, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
TextDrawShowForPlayer(i, textdrawtoall);
}
SetTimer("DestruirTextDrawToAll",5000, false);
return 1;
}
public DestruirTextDrawToAll()
{
TextDrawHideForAll(textdrawtoall);
return 1;
}
code por: Humildade Forever
Re: [Pedido] Ann com TextDraw -
Ricop522 - 10.04.2012
Й isso mesmo cara, cria a textdraw e depois usa
https://sampwiki.blast.hk/wiki/TextDrawSetString
Se nгo sabe criar, leia o tutorial.
Ou quer que eu te de o cуdigo de mгo beijada como fez o cara acima ?
Assim vocк nгo vai aprender
nada e sу vai continuar criando tуpicos para os outros te darem cуdigos prontos. Vocк jб tб bem grandinho pra fazer as coisas por sн sу.
Re: [Pedido] Ann com TextDraw -
Edu33 - 11.04.2012
Quote:
Originally Posted by delete
onplayercomm...
pawn Код:
new cmd[128], string[128], tmp[128], idx; cmd = strtok(cmdtext, idx);
pawn Код:
if(strcmp(cmd, "/cnn", true) == 0) if(PlayerInfo[playerid][Level] >= 2) {
new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[70]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid,-1,"Use: /cnn [mensagem]"); if(strlen(result) > 40) return SendClientMessage(playerid,-1,"O mбximo de caracteres permitido й 40"); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"Admin %s: ~y~%s", name, result); textdrawtoall = TextDrawCreate(325.000000, 394.000000, string); TextDrawAlignment(textdrawtoall, 2); TextDrawBackgroundColor(textdrawtoall, 255); TextDrawFont(textdrawtoall, 1); TextDrawLetterSize(textdrawtoall, 0.399999, 3.199999); TextDrawColor(textdrawtoall, 16711935); TextDrawSetOutline(textdrawtoall, 1); TextDrawSetProportional(textdrawtoall, 1); for(new i; i < MAX_PLAYERS; i ++) { TextDrawShowForPlayer(i, textdrawtoall); } SetTimer("DestruirTextDrawToAll",5000, false); return 1; }
public DestruirTextDrawToAll() { TextDrawHideForAll(textdrawtoall); return 1; }
code por: Humildade Forever
|
Sim isso funfa perfeitamente, uso no meu server de boa,
aliбs foi eu que fiz o topico pedindo isso kkkkkkk
________________________
QUER UM GAMEMODE? UM FILTERSCRIPT? UM MOD? AJUDA?
VISITE-NOS: http://www.sampknd.blogspot.com.br/
QUER UM HOST DE QUALIDADE E NГO ACHA?
AQUI ESTБ: http://www.hosterbrasil.com/
Re: [Pedido] Ann com TextDraw -
Lucas_HenryK - 11.04.2012
deu erros de mas

poderia postar como fs?
Re: [Pedido] Ann com TextDraw -
GReeN_WOoD - 11.04.2012
PHP код:
#include a_samp
#include foreach
#include zcmd
#include sscanf
new Text:TextoDraw;
forward DestruirTextoDraw();
CMD:anunciar(playerid, params[])
{
new Anuncio[128];
new String[128];
if(sscanf(params, "s", Anuncio)) return SendClientMessage(playerid, -1, "Use: /anunciar [mensagem]");
if(strlen(Anuncio) > 40) return SendClientMessage(playerid,-1,"O mбximo de caracteres permitido й 40");
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid,Nome,sizeof(Nome));
format(String,sizeof(String),"Admin %s: ~y~%s", Nome, Anuncio);
TextoDraw = TextDrawCreate(325.000000, 394.000000, String);
TextDrawAlignment(TextoDraw, 2);
TextDrawBackgroundColor(TextoDraw, 255);
TextDrawFont(TextoDraw, 1);
TextDrawLetterSize(TextoDraw, 0.399999, 3.199999);
TextDrawColor(TextoDraw, 16711935);
TextDrawSetOutline(TextoDraw, 1);
TextDrawSetProportional(TextoDraw, 1);
foreach (new i : Player)
{
TextDrawShowForPlayer(i, TextoDraw);
}
SetTimer("DestruirTextoDraw",5000, false);
return true;
}
public DestruirTextoDraw()
{
TextDrawHideForAll(TextoDraw);
return true;
}