Joining Text Draw - 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: Joining Text Draw (
/showthread.php?tid=87014)
Joining Text Draw -
arnoldziux - 17.07.2009
pawn Код:
new Text:Textdraw0;
Textdraw0 = TextDrawCreate(170.000000,410.000000,"%n_[ID:%i]_Has_Joined_the_server.");
TextDrawUseBox(Textdraw0,0);
TextDrawBoxColor(Textdraw0,0x000000ff);
TextDrawTextSize(Textdraw0,-1.000000,146.000000);
TextDrawAlignment(Textdraw0,0);
TextDrawBackgroundColor(Textdraw0,0x0000ff33);
TextDrawFont(Textdraw0,3);
TextDrawLetterSize(Textdraw0,0.499999,0.800000);
TextDrawColor(Textdraw0,0xffffffff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawShowForPlayer(playerid, Text:Textdraw0);
I have done this but how do i get the where the
%n is to be a players name and
%i to be the id to show when a person joins.. because i want to make Join/leave messages with textdraw..
Re: Joining Text Draw -
refshal - 17.07.2009
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s [ID: %d] has joined the server.");
Textdraw0 = TextDrawCreate(170.000000, 410.000000, string);
Re: Joining Text Draw -
arnoldziux - 17.07.2009
Quote:
Originally Posted by еddy
pawn Код:
new PlayerName[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "%s [ID: %d] has joined the server."); Textdraw0 = TextDrawCreate(170.000000, 410.000000, string);
|
This shows my id but not my nickname
Re: Joining Text Draw -
refshal - 17.07.2009
Oops, I forgot something. Use this string:
pawn Код:
format(string, sizeof(string), "%s [ID: %d] has joined the server.", PlayerName, playerid);
Re: Joining Text Draw -
arnoldziux - 17.07.2009
Quote:
Originally Posted by еddy
Oops, I forgot something. Use this string:
pawn Код:
format(string, sizeof(string), "%s [ID: %d] has joined the server.", PlayerName, playerid);
|
It works Thanks a million
EDIT:
What do i do to make the text Draw show for all ?
Heres what it's like now
pawn Код:
new Text:Textdraw0, Text:Textdraw1;
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s_(id:_%d)_has_joined_the_server.", pName, playerid);
Textdraw0 = TextDrawCreate(170.000000, 410.000000, string);
TextDrawTextSize(Textdraw0,-1.000000,146.000000);
TextDrawUseBox(Textdraw0, 0);
TextDrawBoxColor(Textdraw0, 0x000000AA);
TextDrawFont(Textdraw0, 0);
TextDrawSetShadow(Textdraw0,0);
TextDrawSetOutline(Textdraw0,1);
TextDrawBackgroundColor(Textdraw0,0x000000FF);
TextDrawColor(Textdraw0,0xFFFFFFFF);
TimeTextForPlayer(playerid,Textdraw0,Textdraw1,6000);
Re: Joining Text Draw -
Correlli - 18.07.2009
Quote:
Originally Posted by еddy
pawn Код:
new PlayerName[MAX_PLAYER_NAME]; new string[128]; GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "%s [ID: %d] has joined the server."); Textdraw0 = TextDrawCreate(170.000000, 410.000000, string);
|
TextDrawSetString is a lot more useful than your code.
Re: Joining Text Draw -
Annihalation - 18.07.2009
you'll probably either have to do a for (i < MAX_PLAYERS, i++) line or whatever, to where it basically loops the command over and over, for each Player ID. I'm not great of the "for" function but I believe thats how it works.
Re: Joining Text Draw -
saiberfun - 18.07.2009
showtextdrawforall maybe?
maybe im wrong cuz i didnt get really what u wanted^^
Re: Joining Text Draw -
refshal - 18.07.2009
Let's just leave this topic now?