SA-MP Forums Archive
GameTextForPlayer Question - 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: GameTextForPlayer Question (/showthread.php?tid=366125)



GameTextForPlayer Question - borg747 - 05.08.2012

Hey,

I am using GameTextForPlayer on class selection screen (onplayerequestclass) and I would like to know

if I can make the time of this text unlimited and also remove this GameTextForPlayer

once the player has spawned.


Код:
GameTextForPlayer(playerid, "~w~MAFIA BOSS", 20000, 4);
Thanks.


Re: GameTextForPlayer Question - Vince - 05.08.2012

Use textdraws to show text on the screen for an indefinite amount of time. You can also have much more freedom in styling it.


Re: GameTextForPlayer Question - Jikesh - 05.08.2012

Why don't you use https://sampwiki.blast.hk/wiki/TextDrawCreate It also has a function to hide a textdraw.

But I don't know if this works
Код:
GameTextForPlayer(playerid, "~w~MAFIA BOSS", 500000, 4); //time set to 8 mins :P
And then GameTextForPlayer(playerid, "~w~Spawned", 1000, 4); // onplayerspawn
Just a logic, not tested.


Re: GameTextForPlayer Question - BrandyPenguin - 05.08.2012

I recommend use Textdraw instead. create it on onplayerequestclass and hide/destroy it under OnPlayerSpawn.
Edit: Jikesh was faster, but Textdraw is better for this.


Re: GameTextForPlayer Question - borg747 - 05.08.2012

@Jikesh,

That worked, thanks. I also tried:
Код:
GameTextForPlayer(playerid, "~w~", 1000, 4);
and it worked.

Are you sure there is no way to create an indefinite GameTextForPlayer time?


Re: GameTextForPlayer Question - Jikesh - 05.08.2012

I don't think its possible unless you set a time for it. No one will stay on class selection menu for longer than few minutes so you can set to 10 or 15 if that works. (Maybe you can set whatever time you want)

For indefinite time you can use Textdraws easily.


Re: GameTextForPlayer Question - borg747 - 05.08.2012

Okay Thanks for your help.