OnGameModeInit Problem - 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: OnGameModeInit Problem (
/showthread.php?tid=509686)
OnGameModeInit Problem -
maximthepain - 27.04.2014
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:
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!
Re: OnGameModeInit Problem -
Equuuuin0X - 27.04.2014
Try putting the textdraw stuffs in onplayerspawn
Re : Re: OnGameModeInit Problem -
maximthepain - 27.04.2014
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.
Re: OnGameModeInit Problem -
Cena44 - 27.04.2014
You should be using player textdraws, otherwise it will appear to everyone each time a player respawns.
Re : Re: OnGameModeInit Problem -
maximthepain - 27.04.2014
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.
Re : OnGameModeInit Problem -
maximthepain - 27.04.2014
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.