GameTextForPlayer Question
#1

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.
Reply
#2

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

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.
Reply
#4

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.
Reply
#5

@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?
Reply
#6

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

Okay Thanks for your help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)