how to display strings in text draws ?
#1

Any one know how to display strings in text draws ? like showing joining and leaving messages in text draws .
Reply
#2

pawn Код:
format(string, sizeof(string), "%s has joined the server.", playernamehere);

TextDrawSetString(textdrawname, string);
Hope you know the rest!
Reply
#3

not working
Reply
#4

change playernamehere and textdrawname to what you have / need.
Reply
#5

ya i did those but the problem is it displays %S has joined the server not displaying the name
Reply
#6

pawn Код:
new playernamehere[MAX_PLAYER_NAME];
GetPlayerName(playerid, playernamehere, MAX_PLAYER_NAME);
Put that before the format.
Reply
#7

thx working now
Reply
#8

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
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)