OnGameModeInit Problem
#1

I want a textdraw to be shown after player spawns. instead it shows it when he connects and disappears on spawn.
The "TextDrawShowForPlayer" is executed only when player spawns and not when he is connected.

Here is the code:

On TOP:
pawn Код:
new Text:Website;
Under OnGameModeInit:
pawn Код:
Website = TextDrawCreate(5.0, 431.0, "~h~Test");
TextDrawFont(Website, 2);
TextDrawSetShadow(Website, 0);
TextDrawSetOutline(Website, 1);
TextDrawAlignment(Website, 1);
TextDrawLetterSize(Website, 0.300000,1.000000);
TextDrawColor(Website, 0x0183C8FF);
TextDrawSetOutline(Website, 1);
TextDrawUseBox(Website, false);
Under OnPlayerSpawn(playerid):
pawn Код:
TextDrawShowForPlayer(playerid, Website);
When player connects it shows the textdraw. when he spawns the textdraw hides.
only the first textdraw.. no matter which one.. executed when player connects.
Whats the problem? and how i fix it? please help me!
Reply
#2

Try putting the textdraw stuffs in onplayerspawn
Reply
#3

Quote:
Originally Posted by Equuuuin0X
Посмотреть сообщение
Try putting the textdraw stuffs in onplayerspawn
I have only 3 textdraws which needs to be showen OnPlayerSpawn. I can put them OnPlayerSpawn but then the other textdraw which will be executed first in OnGameModeInit will be executed when player connects.


This problem happends only to the first textdraw code OnGameModeInit the rest of the textdraws works fine!

I got 2 more textdraws which is coded the same as this website textdraw and they work fine!
What I'm trying to say is that only the first textdraw.. no matter which one.. executed when player connects.
Reply
#4

You should be using player textdraws, otherwise it will appear to everyone each time a player respawns.
Reply
#5

Quote:
Originally Posted by Cena44
Посмотреть сообщение
You should be using player textdraws, otherwise it will appear to everyone each time a player respawns.
Why should I change all the textdraws if they work fine?
Only the FIRST TextDrawCreate executed when player connects.
Reply
#6

Ohhhhhh. Never mind. i fixed the problem. it was a mistake with other textdraw which i didnt use right. its all working good now. thank you everyone.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)