Sziasztok!
Tegnap csináltam egy Textdrawot a szerverembe.
(A textdraw-t a TextDrawEditor0.6 tal csináltam aminek a linkje: http://samp-scripts.com/post/7034/%5BFS%5D_TextDraw_editor_0.6_-_Multiple_textdraw_support,_for_proffesional_textdraws/Zamaroht/filterscript/other )
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ezt a textdrawt szeretném egy szkriptbe írni de nem tudom hogy..
//TextDraw developed using Zamaroht\'s in-game TextDraw system
//On top of script:
new Text:Textdraw0;
//In OnGameModeInit or any other place, we procced to create our textdraw:
Textdraw0 = TextDrawCreate(464.000000,428.000000,\"DaRkNeSS FreeRoam\");
TextDrawAlignment(Textdraw0,2);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawFont(Textdraw0,3);
TextDrawLetterSize(Textdraw0,1.000000,1.800000);
TextDrawColor(Textdraw0,0x00ffff66);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetShadow(Textdraw0,1);
//You can now use TextDrawShowForPlayer(-ForAll), TextDrawHideForPlayer(-ForAll) and
//TextDrawDestroy functions to show, hide, and destroy the textdraw.
Valaki beleírná nekem egy szkriptbe ÚGY hogy mûködjön?
Vagy linkelhettek egy olyan Textdraw Editort aminek ez már nem probléma :D
#include <a_samp>
new Text:Textdraw0;
public OnFilterScriptInit() //amikor a scriptet elindítjuk, akkor létrehozzuk a textdrawot
{
Textdraw0 = TextDrawCreate(464.000000,428.000000,\"DaRkNeSS FreeRoam\");
TextDrawAlignment(Textdraw0,2);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawFont(Textdraw0,3);
TextDrawLetterSize(Textdraw0,1.000000,1.800000);
TextDrawColor(Textdraw0,0x00ffff66);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetShadow(Textdraw0,1);
return 1;
}
public OnFilterScriptExit() //ha a scriptet kikapcsoljuk akkor a textdrawot eltüntetjük
{
for(new i = 0;i < MAX_PLAYERS;i++)
{
TextDrawHideForPlayer(i, Textdraw0);
}
return 1;
}
public OnPlayerConnect(playerid) //amikor a játékos csatlakozik a szerverre megjelenítjük neki a textdrawot
{
TextDrawShowForPlayer(playerid, Textdraw0);
return 1;
}
//ha máshol akarod használni a megjelenítést akkor a TextDrawShowForPlayer(playerid, Textdraw0); oda másolod be ahol meg akarod jeleníteni pl:OnPlayerSpawn, OnPlayerRequestClass stb..
//ha el akarod rejteni a textdrawot akkor használd a TextDrawHideForPlayer(playerid, Textdraw0);