[Ajuda] Ajuda Com /anuncio
#1

Olб ? peзo que mim ajudem com esse sistema de /anuncio, ficarei grato com a ajuda !

Print do sistema anuncio : http://imgur.com/OjEcVmZ
Reply
#2

Irei invocar a minha bola de cristal ok?
Reply
#3

Invocaзгo concluнda com sucesso, acho que й isso que vocк quer: de uma estudada em

https://sampforum.blast.hk/showthread.php?tid=204856 - Como usar ZCMD + SSCANF
https://sampwiki.blast.hk/wiki/GameTextForPlayer - De uma estudada em GameTextForPlayer


@off
desculpe-me pelo double post, esqueci de editar :/
Reply
#4

Quote:

@FStralioti
Irei invocar a minha bola de cristal ok?

Avontade , Brow ! .
Reply
#5

Quote:
Originally Posted by Coringa253
Посмотреть сообщение
Avontade , Brow ! .
Prуxima vez que for postar algo pedindo ajuda explique melhor sua dъvida, olhe ai encima eu jб postei te ajudando creio que й isso que vocк quer, basta estudar.
Reply
#6

Quote:
Originally Posted by Coringa253
Посмотреть сообщение
Avontade , Brow ! .
Legal.. vc quer ajuda com o sistema, jб tem o cуdigo dele ai ? O que tem de errado ? Ou vocк ta pedindo pra gente criar pra vocк ??
Caso queira fazer um estude o que o FStralioti lhe passou .
Reply
#7

Quote:
Originally Posted by Learning
Посмотреть сообщение
Legal.. vc quer ajuda com o sistema, jб tem o cуdigo dele ai ? O que tem de errado ? Ou vocк ta pedindo pra gente criar pra vocк ??
Entгo por isso postei falando que iria invocar minha bola de cristal mais creio que seja isso

Quote:
Originally Posted by FStralioti
Посмотреть сообщение
Invocaзгo concluнda com sucesso, acho que й isso que vocк quer: de uma estudada em

https://sampforum.blast.hk/showthread.php?tid=204856 - Como usar ZCMD + SSCANF
https://sampwiki.blast.hk/wiki/GameTextForPlayer - De uma estudada em GameTextForPlayer


@off
desculpe-me pelo double post, esqueci de editar :/
Reply
#8

Eu tenho esse sistema :

if(strcmp("/anuncio", cmd, true) == 0)
{
if (PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid, -1, "{FF0000}| {00F5FF}ERRO {FF0000}| {FFFFFF}Vocк nгo estб logado!");
new mensagem[128], n[MAX_PLAYER_NAME];
GetPlayerName(playerid, n, MAX_PLAYER_NAME);
if(sscanf(cmdtext,"s[128]", mensagem)) return SendClientMessage(playerid,-1,"{FF0000}| {00F5FF}INFO {FF0000}| {FFFFFF}Use: /anuncio [mensagem]");
format(string, sizeof(string), "~b~[ADMIN]~r~ %s: ~w~%s", n, mensagem);
TextDrawSetString(textdrawtoall, string);
for (new i; i < MAX_PLAYERS; i++)
{
TextDrawShowForPlayer(i, textdrawtoall);
}
SetTimer("DestruirTextDrawToAll", 5000, false);

return 1;
}

ele й feito em textdraw, mas tem 1 problema , quando digita /anuncio o comando aparece junto com a mensagem para todos. EX : [ADMIN][Coringa]: /anuncio teste samp fуrum.
Reply
#9


• Comando utilizando o processador de comandos zcmd:
PHP код:
CMD:anuncio(playeridparams[])
{
    if(
PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid, -1"{FF0000}| {00F5FF}ERRO {FF0000}| {FFFFFF}Vocк nгo estб logado!");
    new 
mensagem[60], aname[MAX_PLAYER_NAME], string[155];
    
GetPlayerName(playeridanamesizeof(aname));
    if(
sscanf(params"s[60]"mensagem)) return SendClientMessage(playerid,-1,"{FF0000}| {00F5FF}INFO {FF0000}| {FFFFFF}Use: /anuncio [mensagem]");
    
format(stringsizeof(string), "~b~[ADMIN]~r~ %s: ~w~%s"anamemensagem);
    
TextDrawSetString(textdrawtoallstring);
    
TextDrawShowForAll(textdrawtoall);
    
SetTimer("DestruirTextDrawToAll"5000false);
    return 
1;

• Comando utilizando o comparador de strings strcmp:
PHP код:
if( strcmpcmd"/anuncio"true )  == )
{
    if(
PlayerInfo[playerid][pLogged] == 0) return SendClientMessage(playerid, -1"{FF0000}| {00F5FF}ERRO {FF0000}| {FFFFFF}Vocк nгo estб logado!");
    new 
mensagem[60], aname[MAX_PLAYER_NAME], string[155], tmp 256 ];
    
GetPlayerName(playeridanamesizeof(aname));
    
tmp strtokcmdtextidx ) ;
    if( !
strlentmp ) ) return SendClientMessageplayerid, -1"[ x ] {FF0000}use: /reportar  [ Nick ]  [ Motivo ]" ) ;
    
format(stringsizeof(string), "~b~[ADMIN]~r~ %s: ~w~%s"anamemensagem);
    
TextDrawSetString(textdrawtoallstring);
    
TextDrawShowForAll(textdrawtoall);
    
SetTimer("DestruirTextDrawToAll"5000false);
    return 
1;

Reply
#10

Mas fica igual o da imagem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)