Jump to content

Cum faci un TextDraw


IcE.

Recommended Posts

Pentru inceput.

TextDraw-Sa apara pe ecran un text in anumite locuri(adica toate)

Pentru inceput.

Linia asta o pui sub includes pana in OnGameModeInit

new Text:Texd;
Dupaia ne ducem la OnGameModeInit si punem dupa { Punem asta:
Texd = TextDrawCreate(4.000000,435.000000,"Mesajul tau");
TextDrawFont(Texd,3);
TextDrawColor(Texd,0xAA3333AA);
TextDrawLetterSize(Texd,0.599999,1.000000);
TextDrawSetOutline(Texd,1);
TextDrawSetShadow(Texd,1);
TextDrawSetProportional(Texd,1);
Dupaia ne ducem la linia public OnPlayerConnect(playerid) si adaugam sub ia asta:
TextDrawShowForPlayer(playerid,Texd);

Text Nume

[*]Acu sa va spun cum puteti schimba textul:

[*]La linia Texd = TextDrawCreate(4.000000,435.000000,"Mesajul tau"); in loc de Mesajul tau puteti pune sa puneti ce vreti sa apara.

Format Text

[*]Ca sa schimbati formatul la scris dute la linia TextDrawFont(Texd,3); si in loc de 3 poti pune asa:0-Grafiti 1-Normal 2-Subtire 3-Ingrosat

Culoare Text

[*]La linia TextDrawColor(Texd,0xAA3333AA); puteti schimba culoarea daca inlocuti 0xAA3333AA cu alta culoare in format HEX

Sfarsit

Daca vreti sa stiti ceva intrebati ;)

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Guest farse

Daca te referi cum e pe Ro-zone,cand se teleporteaza cineva,creezi o fuctie de genu:

stock FrecaMenta(playerid,name_of_teleport[])
{
new string [256],funame[128];
GetPlayerName(playerid,funame,sizeof(funame));
format(string,sizeof(string),"Nesimtitul de %s sa teleportat la %s"funame,name_of_teleport);
fu =CreateTextDraw(pozitia etc,sting);
///etc,ce e mai pe la TD
TextDrawHideForAll(fu);
TextDrawShowForAll(fu);
SetTimer("AscundeBou",2000,0);
}

forward AscundeBou();
public AscundeBou()
{
TextDrawHideForAll(fu);
return 1;
}

Link to comment
Share on other sites

In primu rand scz de 2x post dar farse unde pui aia cu 

stock FrecaMenta(playerid,name_of_teleport[])
{
new string [256],funame[128];
GetPlayerName(playerid,funame,sizeof(funame));
format(string,sizeof(string),"Nesimtitul de %s sa teleportat la %s"funame,name_of_teleport);
fu =CreateTextDraw(pozitia etc,sting);
///etc,ce e mai pe la TD
TextDrawHideForAll(fu);
TextDrawShowForAll(fu);
SetTimer("AscundeBou",2000,0);
}

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

So, am pus tot corect dar nu-mi apare textdraw-ul, am pus si la onplayerconnect etc..

mai bine foloseste program Textdraw maker mult mai simplu si mai eficient fara warning sau erori
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 4 months later...

stuntman==--" post="24717" timestamp="1263065339"]

Asta e mult mai usor: http://forum.sa-mp.com/index.php?topic=143025.0

Ar trebui corectat de greseli tutorialu asta.

dai bataie si corectezal

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

am si yo o inrebare

se poate face un textdrav in care sa pui niste animati

si cind scri comanda ( EX:animati )

sa iti apara animatiile si sa le selectezi din sageti sau mouse

si cind dai space sau click jucatorul sa fac animatia respectiva

se poate?

Link to comment
Share on other sites

uite aici un fs

//====================(*)RondamMessageTD(*)==========================
//FS by:ICEBOX
//www.sa-mp.ro
//====================(*)RondamMessageTD(*)==========================
//==INCLUDE==
#include <a_samp>
//==News==
new RandomMessages[][] =
{
    "Nume1",//poti modifica
    "Nume2",//poti modifica
};
new Text:TDARandom;
//==ForwarD==
forward RandomMessage();
public OnFilterScriptInit()
{
    print("RondamMessageTD By:[SRC]ICEBOX");
//====================(*)Timer(*)=============================
	SetTimer("RandomMessage",3000,1);
//====================(*)TextDraw(*)==========================
    TDARandom = TextDrawCreate(405.000000,436.000000," ");
    TextDrawUseBox(TDARandom,1);
    TextDrawBoxColor(TDARandom,0x000000ff);
    TextDrawTextSize(TDARandom,647.000000,0.000000);
    TextDrawAlignment(TDARandom,0);
    TextDrawBackgroundColor(TDARandom,0x00ff00cc);
    TextDrawFont(TDARandom,1);
    TextDrawLetterSize(TDARandom,0.299999,1.000000);
    TextDrawColor(TDARandom,0xff0000cc);
    TextDrawSetOutline(TDARandom,1);
    TextDrawSetProportional(TDARandom,1);
    TextDrawSetShadow(TDARandom,1);
	return 1;

}

public RandomMessage()
{
        TextDrawSetString(TDARandom, RandomMessages[random(sizeof(RandomMessages))]);
        return 1;
}

public OnPlayerSpawn(playerid)
{
	TextDrawShowForPlayer(playerid, TDARandom);
	return 1;
}
//====================(*)RondamMessageTD(*)==========================
//FS by:ICEBOX
//www.sa-mp.ro
//====================(*)Sfarsit (*)===============================

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.