08.10.2017, 19:15
So I made a fuction that making shows textdraw to player:
and then I added few skins:
And under OnPlayerRequestClass I used my function:
And finnaly I tried to hid the textdraw when they spawn
When they choose the first skin (CJ) the textdraw dissappear perfectly, but when they choose another skin the textdraw doesnt dissapper ![Sad](images/smilies/sad.gif)
I dont know what to do![Confused](images/smilies/confused.png)
PHP код:
new Text:textdraw;
MyTextDraw(playerid, Float:TextX, Float:TextY, TextString[50], TextColor, TextOutline, TextShadow, TextFont, Float:LetterX, Float:LetterY)
{
textdraw = TextDrawCreate(TextX, TextY, TextString);
TextDrawColor(textdraw, TextColor);
TextDrawSetOutline(textdraw, TextOutline);
TextDrawSetShadow(textdraw, TextShadow);
TextDrawFont(textdraw, TextFont);
TextDrawLetterSize(textdraw, LetterX, LetterY);
TextDrawAlignment(textdraw, 2);
TextDrawShowForPlayer(playerid, textdraw);
}
PHP код:
public OnGameModeInit()
{
SetGameModeText("Deathmatch");
#include <Playerskins> //include of all the AddPlayerClass
return 1;
}
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
MyTextDraw(playerid, 320, 55, "Choose Skin:", COLOR_LIGHTBLUE, 1, 0, 3, 0.7, 3.1);
return 1;
}
PHP код:
public OnPlayerRequestSpawn(playerid)
{
TextDrawHideForPlayer(playerid, textdraw);
return 1;
}
![Sad](images/smilies/sad.gif)
I dont know what to do
![Confused](images/smilies/confused.png)
![Confused](images/smilies/confused.png)