SA-MP Forums Archive
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(playeridplayernamehereMAX_PLAYER_NAME);
    
GetPlayerName(killeridkillernamesizeof(killername));
    
format(stringsizeof(string), "   LATEST KILLS : %s has Pwned %d."playernamehere,killername);
    
Killing TextDrawCreate(-1.000000431.000000string);
    
TextDrawBackgroundColor(Killing255);
    
TextDrawFont(Killing2);
    
TextDrawLetterSize(Killing0.3000001.000000);
    
TextDrawColor(Killing65535);
    
TextDrawSetOutline(Killing1);
    
TextDrawSetProportional(Killing1);
    
TextDrawUseBox(Killing1);
    
TextDrawBoxColor(Killing, -16776961);
    
TextDrawTextSize(Killing638.0000000.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