• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Automatic textdraw line break
#1
Hello guys, how are you?



I want to create a textdraw notification system. but i would like to know how do i break the line if the message exceeds 15 characters? I would like to know how it is possible to divide sentences with more than 15 characters into 2 lines or more. does anyone know any techniques to help me?



I know that if I use "\ n" it will break the line, but I would like to know how I make it automatic, as some messages will be created in game.
  Reply
#2
Use strins(string[], const substr[], pos, maxlength=sizeof string) to insert "\n" to the point where you want a line break.
Check out Desolation Roleplay, where zombie AI and scavenging is bothered by player bandits!


  Reply
#3
(2020-11-29, 09:10 AM)Awide Wrote: Use strins(string[], const substr[], pos, maxlength=sizeof string) to insert "\n" to the point where you want a line break.



And if the message is too big and I need to break the line 2 or 3 times in the same text, how do I do it?
  Reply


Forum Jump: