SA-MP Forums Archive
Makin' GameTextForPlayer bigger? - 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)
+--- Thread: Makin' GameTextForPlayer bigger? (/showthread.php?tid=318961)



Makin' GameTextForPlayer bigger? - Twisted_Insane - 17.02.2012

Simple question! I got this code:

PHP код:
GameTextForPlayer(playerid"~p~JAILED"100006); 
Am I able to make it bigger in some way?


Re: Makin' GameTextForPlayer bigger? - FuTuяe - 17.02.2012

Unfortunately not, you're able to create your own textdraw with the size you want though,

Just make your own function that shows it and then set a timer to hide it.


Re: Makin' GameTextForPlayer bigger? - 2KY - 17.02.2012

You can't do such a thing with GameModeText, sadly. As stated above, use a textdraw and then hide it, however, you do not need a function to create the damn thing, just use the native functions.

pawn Код:
public OnGameModeInit()
{
    YourTextDraw = TextDrawCreate(100.0, 33.0,"Jailed!");
    TextDrawLetterSize(YourTextDraw, 3.2 ,5.1);
    return true;
}
Of course, edit all of this to your liking, and I recommend using Zamaroht's Textdraw Editor to edit items to your preference with ease.


Re: Makin' GameTextForPlayer bigger? - FuTuяe - 17.02.2012

I was referring to something like this:
pawn Код:
stock GameText2ForPlayer(playerid, text[], time) {

    TextDrawSetString(textdrawid, text);
    TextDrawShowForPlayer(playerid, textdrawid);
   
    SetTimerEx("HideTD", time, false, "i", playerid);
}

forward HideTD(playerid);
public HideTD(playerid) TextDrawHideForPlayer(playerid, textdrawid);



Re: Makin' GameTextForPlayer bigger? - MP2 - 17.02.2012

I was planning to make something like that one day, but never got around to it. Think it's been made anyway.


Re: Makin' GameTextForPlayer bigger? - Twisted_Insane - 17.02.2012

Quote:
Originally Posted by 2KY
Посмотреть сообщение
You can't do such a thing with GameModeText, sadly. As stated above, use a textdraw and then hide it, however, you do not need a function to create the damn thing, just use the native functions.

pawn Код:
public OnGameModeInit()
{
    YourTextDraw = TextDrawCreate(100.0, 33.0,"Jailed!");
    TextDrawLetterSize(YourTextDraw, 3.2 ,5.1);
    return true;
}
Of course, edit all of this to your liking, and I recommend using Zamaroht's Textdraw Editor to edit items to your preference with ease.
Looked at that FS, so what is the command for ingame? /textdraw? lol...
Also, I should remove all FS' when usin' this one, eh?


Re: Makin' GameTextForPlayer bigger? - KingHual - 17.02.2012

Quote:
Originally Posted by FuTuяe
Посмотреть сообщение
I was referring to something like this:
pawn Код:
stock GameText2ForPlayer(playerid, text[], time) {

    TextDrawSetString(textdrawid, text);
    TextDrawShowForPlayer(playerid, textdrawid);
   
    SetTimerEx("HideTD", time, false, "i", playerid);
}

forward HideTD(playerid);
public HideTD(playerid) TextDrawHideForPlayer(playerid, textdrawid);
Why would you use a public just to show this.....? It's totally wrong. Instead, he should use
Код:
#define HideTD(%0) TextDrawHideForPlayer(%0, textdrawid)
on top of his script, with all the other defines.