SA-MP Forums Archive
Help with Info Text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Info Text (/showthread.php?tid=65991)



Help with Info Text - djdanni - 18.02.2009

hi. i am trying to add a Infotext. here is my gamemode http://pastebin.com/f5cc56c40
And here is the first one i wan to add in.
pawn Код:
new Text:servername;
servername = TextDrawCreate(0.0, 434.0,"Islenski GTA SA Serverinn");
TextDrawFont(servername,3);
TextDrawLetterSize(servername,20,20);
TextDrawColor(servername,0x00F6FF);
TextDrawSetShadow(servername,1);
TextDrawSetOutline(servername,1);
TextDrawBackgroundColor(servername,0x0F60FF);
TextDrawUseBox(servername,1);
TextDrawBoxColor(servername,0xF600FF);
Here is the second one
pawn Код:
new Text:servername;
servername = TextDrawCreate(0.0, 0.0,"Islenski GTA SA Serverinn");
TextDrawFont(servername,3);
TextDrawLetterSize(servername,20,20);
TextDrawColor(servername,0x00F6FF);
TextDrawSetShadow(servername,1);
TextDrawSetOutline(servername,1);
TextDrawBackgroundColor(servername,0x0F60FF);
TextDrawUseBox(servername,1);
TextDrawBoxColor(servername,0xF600FF);
Where and hwo do i add this in the gamemode?


Re: Help with Info Text - Kanji_Suzuki - 18.02.2009

add to "Public OnPlayerConnect"


Re: Help with Info Text - kc - 18.02.2009

Will the textdraw show player specific information? If not, then you can just put that into GameModeInit

And then use TextDrawShowForPlayer to show it in OnPlayerConnect


Re: Help with Info Text - djdanni - 18.02.2009

you said add thi in Under OnPlayerConnect?
This is texture witch whill be always on the screen.
abd when i try to add it i just get error.


Re: Help with Info Text - Nero_3D - 18.02.2009

Quote:
Originally Posted by djdanni
you said add thi in Under OnPlayerConnect?
This is texture witch whill be always on the screen.
abd when i try to add it i just get error.
He said
1. add the new servername somewhere above
2. add the textdrawcreate with all settings at OnGameModeInit (because it get only once called)
3. add TextDrawShowForPlayer at OnPlayerConnect


Re: Help with Info Text - djdanni - 18.02.2009

Can you do it for me? I am littel comfused


Re: Help with Info Text - Nero_3D - 18.02.2009

I did that before till my pc crashed :S
pawn Код:
//Somewhere before
new Text:servername1;
new Text:servername2;
pawn Код:
//OnGameModeInit (gets called when the server starts - once)
servername1 = TextDrawCreate(0.0, 434.0,"Islenski GTA SA Serverinn");
servername2 = TextDrawCreate(0.0, 0.0,"Islenski GTA SA Serverinn");
TextDrawFont(servername1,3);
TextDrawFont(servername2,3);
TextDrawLetterSize(servername1,20,20);
TextDrawLetterSize(servername2,20,20);
TextDrawColor(servername1,0x00F6FF);
TextDrawColor(servername2,0x00F6FF);
TextDrawSetShadow(servername1,1);
TextDrawSetShadow(servername2,1);
TextDrawSetOutline(servername1,1);
TextDrawSetOutline(servername2,1);
TextDrawBackgroundColor(servername1,0x0F60FF);
TextDrawBackgroundColor(servername2,0x0F60FF);
TextDrawUseBox(servername1,1);
TextDrawUseBox(servername2,1);
TextDrawBoxColor(servername1,0xF600FF);
TextDrawBoxColor(servername2,0xF600FF);
pawn Код:
//OnPlayerConnect (gets called when a player connects)
TextDrawShowForPlayer(playerid, servername1);
TextDrawShowForPlayer(playerid, servername2);



Re: Help with Info Text - djdanni - 18.02.2009

I have try but i don't know so mutch aboat Coding. Can somone do it for me?


Re: Help with Info Text - djdanni - 20.02.2009

ok it did not go whell with the othere but now i am trying diffrend.
pawn Код:
//On top of script:
new Text:Textdraw0;
new Text:Textdraw1;
 
//In OnGameModeInit or any other place, we procced to create our textdraw:
Textdraw0 = TextDrawCreate(279.000000,426.000000,"Islenski GTA SA Serverinn");
Textdraw1 = TextDrawCreate(3.000000,436.000000,"[url]http://www.gtasa.is"[/url]);
TextDrawAlignment(Textdraw0,0);
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawBackgroundColor(Textdraw1,0x00ff0033);
TextDrawFont(Textdraw0,2);
TextDrawLetterSize(Textdraw0,0.599999,2.000000);
TextDrawFont(Textdraw1,2);
TextDrawLetterSize(Textdraw1,0.399999,1.000000);
TextDrawColor(Textdraw0,0x00ff00ff);
TextDrawColor(Textdraw1,0x0000ffff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw0,1);
TextDrawSetShadow(Textdraw1,1);
I have tryed all that it say i shut do add it on the Top but no use :S
Here is the Gamemode witch i am using now http://pastebin.com/f4f948467
Can somone be so kind for me to add this in


Re: Help with Info Text - djdanni - 20.02.2009

Can somone help me pleas?