how to display strings in text draws ? - 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: how to display strings in text draws ? (
/showthread.php?tid=176860)
how to display strings in text draws ? -
James124 - 15.09.2010
Any one know how to display strings in text draws ? like showing joining and leaving messages in text draws .
Re: how to display strings in text draws ? - [L3th4l] - 15.09.2010
pawn Код:
format(string, sizeof(string), "%s has joined the server.", playernamehere);
TextDrawSetString(textdrawname, string);
Hope you know the rest!
Re: how to display strings in text draws ? -
James124 - 20.09.2010
not working
Re: how to display strings in text draws ? -
Retardedwolf - 20.09.2010
change playernamehere and textdrawname to what you have / need.
Re: how to display strings in text draws ? -
James124 - 20.09.2010
ya i did those but the problem is it displays %S has joined the server not displaying the name
Re: how to display strings in text draws ? -
Retardedwolf - 20.09.2010
pawn Код:
new playernamehere[MAX_PLAYER_NAME];
GetPlayerName(playerid, playernamehere, MAX_PLAYER_NAME);
Put that before the format.
Re: how to display strings in text draws ? -
James124 - 20.09.2010
thx working now
Re: how to display strings in text draws ? -
James124 - 20.09.2010
on top of the sciprt :
PHP код:
new Text:Textdraw2;
under onplayerdeath
TextDrawShowForAll(Killing);
new playernamehere[MAX_PLAYER_NAME];
new string[128];
new killername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playernamehere, MAX_PLAYER_NAME);
GetPlayerName(killerid, killername, sizeof(killername));
format(string, sizeof(string), " LATEST KILLS : %s has Pwned %d.", playernamehere,killername);
Killing = TextDrawCreate(-1.000000, 431.000000, string);
TextDrawBackgroundColor(Killing, 255);
TextDrawFont(Killing, 2);
TextDrawLetterSize(Killing, 0.300000, 1.000000);
TextDrawColor(Killing, 65535);
TextDrawSetOutline(Killing, 1);
TextDrawSetProportional(Killing, 1);
TextDrawUseBox(Killing, 1);
TextDrawBoxColor(Killing, -16776961);
TextDrawTextSize(Killing, 638.000000, 0.000000);
you guys know how to make it to show latest kills ? it didnt even show up
Re: how to display strings in text draws ? -
Retardedwolf - 20.09.2010
You create and set the properties in 'OnGameModeInIt' then format + Show it to the player.
https://sampwiki.blast.hk/wiki/TextDrawSetString
https://sampwiki.blast.hk/wiki/TextDrawShowForAll