Jump to content
  • 0

Intrebare


BuBu

Question

Salut cum pot face si eu o mica chestie deci cand scrie pe chat-ul normal cum ar fi BuBu sa ii apara un text "BuBu e cel mai tare :)) " ceva de genu am vazut odata de mult pe un GM ca a facut asa... eu am incercat ceva dar nu am reusit.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

vrei sa spui sa trimita clientmessages?

1)Faci asa:

[pawn]

new SendMessages[ ][ ] =

{

    "BuBu e cel mai tare",

    "Al doilea messaj pe care vrei sa il trimita",

    "Al 3...si tot asa"//ai grija...ca ultimul mesaj pe care vrei sa il pui sa nu fie cu , la sfarsit!ca va da error

};

[/pawn]

Deci am creat mesajele acum doar trebuie sa adaugi ceva gen:

[pawn]

forward SendMesagesToAll( )

{

    SendClientMessageToAll( culoare, SendMessages[ random( sizeof( SendMessages) ) ] );//va trimite mesajele la intamplare( random )

    return 1;

}

[/pawn]

deci am creat tot...dar mai trebuie sa punem un timer care sa trimita mesajele la un timp anume

deci mergem la OnGameModeInit sau OnFilterScriptInit conteaza unde vrei sa le pui

si adaugam:

[pawn]

SetTimer( "SendMesagesToAll", 60*1000, 1 );//Trimite o data la 60 de sec..poti sa schimbi timerul!

[/pawn]

The end ;)

Fara reclama in semnatura!

Link to comment
Share on other sites

Pune functia asta in gm :

[pawn]public OnPlayerText(playerid, text[])

{

  // ad block, use something to loop through all words in a sentence

  new distance = LevenshteinDistance("server",word);

  if (distance != -1 && distance <= 2) // it takes two or less operations to go to the word server

  {

      SendClientMessage(playerid, COLOUR_RED, "HaHaHa! nu poti face reclama  :(( !");

      return 0;

  }

  return 1;

}[/pawn]

Si creeaza in filterscripts un fisier .cfg si acolo scrie toate cuvintele unu sub altu in care vrei sa apara textu asta cand scrie pe chat.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.