29.04.2011, 14:07
(
Последний раз редактировалось [MWR]Blood; 29.04.2011 в 14:41.
)
Hello, I've got a problem.
I made a total of 8 textdraws for my server appearing when the player connects.
At first everything is alright, but after some time the box of the textdraw doesn't show when I connect.
I'm showing the textdraws on OnPlayerConnect, and hiding them on OnPlayerSpawn.
I don't get what causes this problem.
Could you help me with this?
Thanks in advance!
I made a total of 8 textdraws for my server appearing when the player connects.
At first everything is alright, but after some time the box of the textdraw doesn't show when I connect.
I'm showing the textdraws on OnPlayerConnect, and hiding them on OnPlayerSpawn.
I don't get what causes this problem.
Could you help me with this?
pawn Код:
Textdraw0 = TextDrawCreate(21.000000, 99.000000, "~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~~N~");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 0);
TextDrawLetterSize(Textdraw0, 0.619999, 1.900000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 0x00000066);
TextDrawTextSize(Textdraw0, 211.000000, 0.000000);
Textdraw1 = TextDrawCreate(20.000000, 102.000000, "~r~~h~ New Stunt Generation");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 0);
TextDrawLetterSize(Textdraw1, 0.609999, 1.900000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(43.000000, 120.000000, "~g~~h~Stunt/DM/Freeoram/Race/Fun");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 2);
TextDrawLetterSize(Textdraw2, 0.170000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
Textdraw3 = TextDrawCreate(20.000000, 151.000000, "~b~Type ~y~/cmds ~b~for the commands");
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 2);
TextDrawLetterSize(Textdraw3, 0.280000, 1.100000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
Textdraw4 = TextDrawCreate(20.000000, 151.000000, "~b~Type ~y~/cmds ~b~for the commands");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 2);
TextDrawLetterSize(Textdraw4, 0.280000, 1.100000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
Textdraw5 = TextDrawCreate(20.000000, 202.000000, "~b~Type ~y~/teles ~b~to check the teleports");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 2);
TextDrawLetterSize(Textdraw5, 0.230000, 1.100000);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);
Textdraw6 = TextDrawCreate(20.000000, 257.000000, "~b~Type ~y~/v ~b~to spawn a vehicle");
TextDrawBackgroundColor(Textdraw6, 255);
TextDrawFont(Textdraw6, 2);
TextDrawLetterSize(Textdraw6, 0.230000, 1.100000);
TextDrawColor(Textdraw6, -1);
TextDrawSetOutline(Textdraw6, 1);
TextDrawSetProportional(Textdraw6, 1);
Textdraw7 = TextDrawCreate(20.000000, 322.000000,"www.example.com");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, 1);
TextDrawLetterSize(Textdraw7, 0.410000, 1.900000);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 1);
TextDrawSetProportional(Textdraw7, 1);
public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid,pColors[random(sizeof(pColors))]);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw5);
TextDrawShowForPlayer(playerid,Textdraw6);
TextDrawShowForPlayer(playerid,Textdraw7);
//my other stuff here
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6);
TextDrawHideForPlayer(playerid,Textdraw7);
//other stuff here...
return 1;
}
![Smiley](images/smilies/smile.png)