[CAMPANIE STAFF]Cautam moderatori si designeri activi!
Welcome to WTFCS Community Forums!
Servere gaming la super-preturi! [HOSTING SERVICE]
-->






[TUTORIAL] SendClientMessage pe Textdraw
Author : mihay111, Category : Tutoriale, 0 Replyes, 279 Views
EVALUATE THIS TOPIC
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 Guest(s)
Moderator
     
577
POSTS
452
THREADS
190
REPUTATION
Male
Sex

WtfCs Coins: 0.15[w]

Suit Member
11-10-2021, 11:37 AM
#1
Diferenta fata de SendClientMessage simplu? Acesta e pe TextDraw

Sa incepem!

Code:
/* avem nevoie de un textdraw simplu pt a arata jucatorului acest mesaj pe ecran nu in chat. */
new
    Text:SCMT[ MAX_PLAYERS ]; // numele textraw-ului pe care il avem

/* mergem in OnPlayerConnect */

public OnPlayerConnect( playerid )
{
  /* textdraw-ul nostru, cu numele SCMT care a fost definit prin variabila globala la inceput */
  SCMT[playerid] = TextDrawCreate(36.000000, 144.000000, "_");
  TextDrawBackgroundColor(SCMT[playerid], 255);
  TextDrawFont(SCMT[playerid], 2);
  TextDrawLetterSize(SCMT[playerid], 0.250000, 1.099999);
  TextDrawColor(SCMT[playerid], -1);
  TextDrawSetOutline(SCMT[playerid], 0);
  TextDrawSetProportional(SCMT[playerid], 1);
  TextDrawSetShadow(SCMT[playerid], 1);
  TextDrawUseBox(SCMT[playerid], 1);
  TextDrawBoxColor(SCMT[playerid], 118);
  TextDrawTextSize(SCMT[playerid], 220.000000, 5.000000);
  return 1;
}

/* in orice loc al GM-ului */

stock SendTD(playerid, text[], time)
{
    TextDrawSetString(SCMT[playerid], text); // modifica textdraw-ul cu textul introdus in functia dvs.
    SetTimerEx("TimeHideForPlayer", time, 1, "i", playerid); // ascunde textdraw-ul cu textul dvs. dupa timpul introdus in functie
    return TextDrawShowForPlayer(playerid, SCMT[playerid]); // arata textdraw-ul cu textul din functia dvs.
}
forward TimeHideForPlayer(playerid);
public TimeHideForPlayer(playerid) TextDrawHideForPlayer(playerid, SCMT[playerid]);


/* exemplu cum poti folosi in gm aceasta functie */
CMD:test(playerid) {

  SendTD(playerid, " Testarea acestei functii", 500);
  return 1;
}
Autor: HEMINGWAY
Mihai nu face flotari, el le cumpara gata facute!
Mihai s-a nascut intr-o cabana construita de el.
Mihai a omorat 50 de teroristi din 2 gloante.Primul a fost de avertizare.
Mihai poate sa isi faca poze cu telefonul fix.
Mihai a raspuns la un apel pierdut.
Singura femeie care si-a permis sa faca glume despre Mihai a fost Elodia, de aia nu mai este.
Cand Mihai iti arata degetul nu o face ca sa te injure... doar iti arata cate secunde mai ai de trait!
You are not allowed to view links. Register or Login to view.


Messages In This Thread
SendClientMessage pe Textdraw - by mihay111 - 11-10-2021, 11:37 AM

Forum Jump: