Balkan SA:MP

San Andreas Multiplayer - www.sa-mp.com => Tutorijali u vezi SA-MPa => Temu započeo: []Flynâ„¢ poslato Avgust 10, 2011, 15:38:21 POSLE PODNE

Naslov: [TuT] TextDraw Tutorial
Poruka od: []Flynâ„¢ poslato Avgust 10, 2011, 15:38:21 POSLE PODNE



U ovom Tutorialu cu pokusati da vam sto bolje objasnim kako napraviti Tutorial u TextDrawu.
Pa da pocnemo...




Za ovo ce vam biti potrebno sledece:
TextDrawEditor(Preporucujem ovaj): KLIK (http://forum.sa-mp.com/showthread.php?)



1.Korak

Kada napravite TextDrawove u TD Editoru potrebno je staviti ih u GM.
Kako to uraditi?

-Tamo gde su vam svi "new" dodajte:

//TUTORIAL
new Text:Tutorial[MAX_PLAYERS][6];

new TutorialVreme[MAX_PLAYERS];




2.Korak

-Sada trebamo ubaciti kreirane TextDrawove.
-CTRL + F i ukucajte "public OnPlayerConnect"
-Ispod toga dodajte svoje TextDrawove
-Kako bi to trebalo da izgleda?


Tutorial[playerid][0] = TextDrawCreate(KORDINATE, "New Textdraw");TextDrawBackgroundColor(Tutorial[playerid][0], 255);TextDrawFont(Tutorial[playerid][0], FONT);TextDrawLetterSize(Tutorial[playerid][0], VELICINA);TextDrawColor(Tutorial[playerid][0], BOJA);TextDrawSetOutline(Tutorial[playerid][0], 0);TextDrawSetProportional(Tutorial[playerid][0], 1);TextDrawSetShadow(Tutorial[playerid][0], 1);
Tutorial[playerid][1] = TextDrawCreate(KORDINATE, "New Textdraw");TextDrawBackgroundColor(Tutorial[playerid][1], 255);TextDrawFont(Tutorial[playerid][1], FONT);TextDrawLetterSize(Tutorial[playerid][1], VELICINA);TextDrawColor(Tutorial[playerid][1], BOJA);TextDrawSetOutline(Tutorial[playerid][1], 0);TextDrawSetProportional(Tutorial[playerid][1], 1);TextDrawSetShadow(Tutorial[playerid][1], 1);
Tutorial[playerid][2] = TextDrawCreate(KORDINATE, "New Textdraw");TextDrawBackgroundColor(Tutorial[playerid][2], 255);TextDrawFont(Tutorial[playerid][2], FONT);TextDrawLetterSize(Tutorial[playerid][2], VELICINA);TextDrawColor(Tutorial[playerid][2], BOJA);TextDrawSetOutline(Tutorial[playerid][2], 0);TextDrawSetProportional(Tutorial[playerid][2], 1);TextDrawSetShadow(Tutorial[playerid][2], 1);TextDrawUseBox(Tutorial[playerid][2], 1);TextDrawBoxColor(Tutorial[playerid][2], BOXBOJA);TextDrawTextSize(Tutorial[playerid][2], VELICINATEXTA);
Tutorial[playerid][3] = TextDrawCreate(KORDINATE, "New Textdraw");TextDrawAlignment(Tutorial[playerid][3], 3);TextDrawBackgroundColor(Tutorial[playerid][3], 255);TextDrawFont(Tutorial[playerid][3], FONT);TextDrawLetterSize(Tutorial[playerid][3], VELICINA);TextDrawColor(Tutorial[playerid][3], BOJA);TextDrawSetOutline(Tutorial[playerid][3], 0);TextDrawSetProportional(Tutorial[playerid][3], 1);TextDrawSetShadow(Tutorial[playerid][3], 1);TextDrawUseBox(Tutorial[playerid][3], 1);TextDrawBoxColor(Tutorial[playerid][3], BOXBOJA);TextDrawTextSize(Tutorial[playerid][3], VELICINATEXTA);
Tutorial[playerid][4] = TextDrawCreate(KORDINATE, "New Textdraw");TextDrawAlignment(Tutorial[playerid][4], 3);TextDrawBackgroundColor(Tutorial[playerid][4], 255);TextDrawFont(Tutorial[playerid][4], FONT);TextDrawLetterSize(Tutorial[playerid][4], VELICINA);TextDrawColor(Tutorial[playerid][4], BOJA);TextDrawSetOutline(Tutorial[playerid][4], 0);TextDrawSetProportional(Tutorial[playerid][4], 1);TextDrawSetShadow(Tutorial[playerid][4], 1);TextDrawUseBox(Tutorial[playerid][4], 1);TextDrawBoxColor(Tutorial[playerid][4], BOXBOJA);TextDrawTextSize(Tutorial[playerid][4], VELICINATEXTA);
Tutorial[playerid][5] = TextDrawCreate(KORDINATE, "New Textdraw");TextDrawBackgroundColor(Tutorial[playerid][5], 255);TextDrawFont(Tutorial[playerid][5], FONT);TextDrawLetterSize(Tutorial[playerid][5], VELICINA);TextDrawColor(Tutorial[playerid][5], BOJA);TextDrawSetOutline(Tutorial[playerid][5], 0);TextDrawSetProportional(Tutorial[playerid][5], 1);TextDrawSetShadow(Tutorial[playerid][5], 1);


Napomena: Ukoliko vam izbaci ovaj error:
error 075: input line too long (after substitutions)
To znaci da je linija predugacka, i samo nesto od TextDrawa prebacite u novi red.



3.Korak

Sada treba da napravimo Tutorial i kada ce ga prikazati.
Kako cemo to uraditi?
-CTRL+F i ukucajte "public OnPlayerConnect
-Ispod toga dodajte, ovako:

public OnPlayerConnect(playerid)
{
    TutorialVreme[playerid] = 1;// 1 pokrece tutorial ako ovo "if(TutorialVreme[playerid] >=1;" stavite u poseban public.

    if(TutorialVreme[playerid] >= 1)
{
    TutorialVreme[playerid] += 1;
    if(TutorialVreme[playerid] == 5)
    {
        TextDrawShowForPlayer(playerid, Tutorial[playerid][0]);
                      TextDrawShowForPlayer(playerid, Tutorial[playerid][1]);
                      TextDrawShowForPlayer(playerid, Tutorial[playerid][2]);
                      TextDrawShowForPlayer(playerid, Tutorial[playerid][3]);
        TextDrawSetString(Tutorial[playerid][4], "TUTORIAL - POCETAK");
        TextDrawSetString(Tutorial[playerid][5], "TEXT!");
    }
    else if(TutorialVreme[playerid] == 10)
    {
                          SetPlayerPos(playerid,X,Y,Z);
                SetPlayerCameraPos(playerid, X,Y,Z);
                        SetPlayerCameraLookAt(playerid, X,Y,Z);
                          TextDrawSetString(Tutorial[playerid][4], "Tutorial - Vrsta Servera");
TextDrawHideForPlayer(playerid, Tutorial[playerid][5]);
    }
    else if(TutorialVreme[playerid] == 15)
    {
                          TextDrawSetString(Tutorial[playerid][0], "TEXT");
        TextDrawSetString(Tutorial[playerid][1], "TEXT");
                          TextDrawSetString(Tutorial[playerid][2], "TEXT");
        TextDrawSetString(Tutorial[playerid][3], "TEXT");;
        TextDrawShowForPlayer(playerid, Tutorial[playerid][4]);
        TextDrawShowForPlayer(playerid, Tutorial[playerid][5]);

    }
    else if(TutorialVreme[playerid] == 25)
    {
SetPlayerPos(playerid,X,Y,Z);
SetPlayerCameraPos(playerid, X,Y,Z4);
                      SetPlayerCameraLookAt(playerid, X,Y,Z);
                          TextDrawSetString(Tutorial[playerid][5], "TUTORIAL - KRAJ");
        TextDrawHideForPlayer(playerid, Tutorial[playerid][0]);
        TextDrawHideForPlayer(playerid, Tutorial[playerid][1]);
        TextDrawHideForPlayer(playerid, Tutorial[playerid][2]);
        TextDrawHideForPlayer(playerid, Tutorial[playerid][3]);
        TextDrawHideForPlayer(playerid, Tutorial[playerid][4]);
        TextDrawHideForPlayer(playerid, Tutorial[playerid][5]);
                                //OVDE STAVITE REGISTRACIJU Iserver uklonjen! PITANJA, ZAVISI STA I KAKO KORISTITE
}
}
}
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: GaLLe poslato Avgust 10, 2011, 16:19:57 POSLE PODNE
Dobar Tut , Nadam se da ce Pomocice Nekome :)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: [EM]DiNorscio^^ poslato Avgust 10, 2011, 17:03:22 POSLE PODNE
Ovo je veoma korisan TUT,lagan za pocetnike  ;)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: []Flynâ„¢ poslato Avgust 11, 2011, 03:31:54 PRE PODNE
Hvala.  :)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: [ED] Kazakov poslato Avgust 11, 2011, 12:30:22 POSLE PODNE
Odlično. Pomoći će početnicima.
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: []Flynâ„¢ poslato Januar 13, 2012, 03:32:30 PRE PODNE
Citat: [ED] Kazakov poslato Avgust 11, 2011, 12:30:22 POSLE PODNE
Odlično. Pomoći će početnicima.
Hvala.



Mali refresh  ;D

Ovde nisam redom objasnjvao jer i nema puno toga da se objasnjuje, trebalo bi sve biti jasno samim pogledom u kod.
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: [UG]Cile poslato Januar 13, 2012, 10:23:47 PRE PODNE
Odlican TuT
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: []Flynâ„¢ poslato Januar 15, 2012, 01:01:25 PRE PODNE
Citat: [BUL] Cile poslato Januar 13, 2012, 10:23:47 PRE PODNE
Odlican TuT
tenk ju  ;D
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: [UG]Cile poslato Januar 15, 2012, 01:19:19 PRE PODNE
odlicno ;)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: Mr.Gagi poslato Januar 15, 2012, 11:05:36 PRE PODNE
Citat: [BUL] Cile poslato Januar 15, 2012, 01:19:19 PRE PODNE
odlicno ;)
Dva posta iznad si napisao: "Odlican TuT" i sada si opet napisao odlicno. Nemoj bezveze da spamas i ide prijava smodu

EDIT:
Pardon to je klasicno skupljanje postova. Video sam u jos jednoj temi da prvo govoris los tut pa posle jedne stranice Dobar tut.
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: [BU] Misur poslato Januar 15, 2012, 13:13:23 POSLE PODNE
Citat: GaLLe poslato Avgust 10, 2011, 16:19:57 POSLE PODNE
Dobar Tut , Nadam se da ce Pomocice Nekome :)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: []Flynâ„¢ poslato Januar 15, 2012, 14:39:06 POSLE PODNE


Update - v2



:)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: DeadDon poslato Januar 15, 2012, 14:40:29 POSLE PODNE
Vrlo korisan tutorial (ne samo za početnike)! Svaka čast!  ;)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: R0xOr poslato Januar 20, 2012, 12:02:15 POSLE PODNE
Odlican TuT  ;D ;D ;D ;D  8)  8)  8)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: <[W00z!E]> poslato Januar 20, 2012, 18:54:52 POSLE PODNE
odlicno posluzice ;)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: Mladen Smiljan poslato Januar 21, 2012, 18:56:14 POSLE PODNE
Dobro je
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: Gotti747 poslato Januar 21, 2012, 20:50:36 POSLE PODNE
Citat: [BUL] Cile poslato Januar 15, 2012, 01:19:19 PRE PODNE
odlicno ;)

nije ni tebi bas lako, zabrana pisanja 24h
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: Danijel96.pwn poslato Januar 21, 2012, 22:03:21 POSLE PODNE
Pomocice pocetnicima :DD
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: [BU]Davidoff poslato Januar 23, 2012, 17:48:17 POSLE PODNE
Odlican tut svaka cast  ;)
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: Ivana19 poslato Januar 24, 2012, 21:13:37 POSLE PODNE
Moze tko stavit link?
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: []Flynâ„¢ poslato Januar 24, 2012, 21:16:53 POSLE PODNE
Citat: Ivana19 poslato Januar 24, 2012, 21:13:37 POSLE PODNE
Moze tko stavit link?
Kakav link?
Naslov: Odg: [TuT] TextDraw Tutorial
Poruka od: LOckeRâ„¢ poslato Oktobar 06, 2012, 12:46:21 POSLE PODNE
Citat: Markeloff Semenka poslato Oktobar 06, 2012, 12:43:55 POSLE PODNE
Odlican TUT :)
Prijava Smodu ...