2024-06-09, 12:03 PM
(2024-06-07, 11:03 AM)N0FeaR Wrote: GameTextForPlayer function does not support newline characters (\n) for creating multi-line texts. This is a limitation of the SA-MP text drawing functions. However, you can use the TextDraw system to achieve multi-line
Below is an example of how you can do this
PHP Code:new Text:line1; new Text:line2; public OnGameModeInit() { line1 = TextDrawCreate(320.0, 240.0, "LINE ONE"); TextDrawFont(line1, 1); TextDrawLetterSize(line1, 0.3, 1.2); TextDrawColor(line1, 0xFFFFFFFF); TextDrawSetOutline(line1, 1); line2 = TextDrawCreate(320.0, 255.0, "LINE TWO"); TextDrawFont(line2, 1); TextDrawLetterSize(line2, 0.3, 1.2); TextDrawColor(line2, 0xFFFFFFFF); TextDrawSetOutline(line2, 1); } public OnPlayerConnect(playerid) { ShowPlayerGameText(playerid); } ShowPlayerGameText(playerid) { TextDrawShowForPlayer(playerid, line1); TextDrawShowForPlayer(playerid, line2); }
I found a solution, thanks for the answer.
I used it this way and it worked:
PHP Code:
GameTextForPlayer(playerid, "LINE ONE ~n~ LINE TWO", 3000, 4);
RECEBA! É O CARA DA LUVA DE PEDREIRO!
GRAÇAS A DEUS PAI! O MELHOR DO MUNDO!
![[Image: giphy.gif]](https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExcm52dmVzdzVjb21rbmJnczM0cDhzY2dscHNxZ2NlZWUxaXV3d2EyNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/1ngaeOmc6GLqY2qly4/giphy.gif)
