Whats wrong with this textdraws
#1

Hello I want to ask for your help cuz I have really big problems with my textdraws. Everytime I connect to game my first textdraw is bugging I tried to replace all my textdraws when player connect but its not working. I changed all my textdraws names too cuz I was thinking that it can be from same textdraws name but its not. Only my first textdraw disappear and its showing after I spawn.


http://imgur.com/a/CK5M8
Reply
#2

Textdraw IDs start with 0. Newly created arrays and variables are also filled with 0.
Maybe you hide textdraw which is not created yet. You may try to fill all textdraw variables with some invalid value (65535) before you create any TD or simply search for part of code which hides textdraw #0
Reply
#3

Textdraw0 = TopMenu this is the name of my first textdraw and everything was perfect it just bugged I don't know why when I change it with BotMenu it will disappear and TopMenu will work as its second. I know how to fix it but I want to know why this is bugging.


P.S If you have this problem just create empty textdraw and it will hide something that we don't use.
Reply
#4

Show us the code, it's a misunderstanding made on the script.
Reply
#5

PHP код:
stock LoadLoginTextdraws()
{
    Empty = 
TextDrawCreate(816.000000, -121.000000" ");
    
TextDrawSetSelectable(Empty, 0);
    
TopBox TextDrawCreate(816.000000, -121.000000"_");
    
TextDrawBackgroundColor(TopBox255);
    
TextDrawFont(TopBox1);
    
TextDrawLetterSize(TopBox0.40999927.400001);
    
TextDrawColor(TopBox, -1);
    
TextDrawSetOutline(TopBox0);
    
TextDrawSetProportional(TopBox1);
    
TextDrawSetShadow(TopBox1);
    
TextDrawUseBox(TopBox1);
    
TextDrawBoxColor(TopBox255);
    
TextDrawTextSize(TopBox, -129.00000060.000000);
    
TextDrawSetSelectable(TopBox0);
    
BotBox TextDrawCreate(816.000000350.000000"_");
    
TextDrawBackgroundColor(BotBox255);
    
TextDrawFont(BotBox1);
    
TextDrawLetterSize(BotBox0.40999927.400001);
    
TextDrawColor(BotBox255);
    
TextDrawSetOutline(BotBox0);
    
TextDrawSetProportional(BotBox1);
    
TextDrawSetShadow(BotBox1);
    
TextDrawUseBox(BotBox1);
    
TextDrawBoxColor(BotBox255);
    
TextDrawTextSize(BotBox, -129.00000060.000000);
    
TextDrawSetSelectable(BotBox0);
    
TopLine TextDrawCreate(730.000000130.000000"_");
    
TextDrawBackgroundColor(TopLine255);
    
TextDrawFont(TopLine1);
    
TextDrawLetterSize(TopLine0.5299990.599999);
    
TextDrawColor(TopLine, -1);
    
TextDrawSetOutline(TopLine0);
    
TextDrawSetProportional(TopLine1);
    
TextDrawSetShadow(TopLine1);
    
TextDrawUseBox(TopLine1);
    
TextDrawBoxColor(TopLine226554568);
    
TextDrawTextSize(TopLine, -205.0000000.000000);
    
TextDrawSetSelectable(TopLine0);
    
BotLine TextDrawCreate(730.000000340.000000"_");
    
TextDrawBackgroundColor(BotLine255);
    
TextDrawFont(BotLine1);
    
TextDrawLetterSize(BotLine0.5299990.599999);
    
TextDrawColor(BotLine, -1);
    
TextDrawSetOutline(BotLine0);
    
TextDrawSetProportional(BotLine1);
    
TextDrawSetShadow(BotLine1);
    
TextDrawUseBox(BotLine1);
    
TextDrawBoxColor(BotLine226554568);
    
TextDrawTextSize(BotLine, -205.0000000.000000);
    
TextDrawSetSelectable(BotLine0);
    
ServerCreator TextDrawCreate(225.000000102.000000"OT: FeRRum[Scripter]");
    
TextDrawBackgroundColor(ServerCreator255);
    
TextDrawFont(ServerCreator1);
    
TextDrawLetterSize(ServerCreator0.5000001.000000);
    
TextDrawColor(ServerCreator, -16776961);
    
TextDrawSetOutline(ServerCreator0);
    
TextDrawSetProportional(ServerCreator1);
    
TextDrawSetShadow(ServerCreator1);
    
TextDrawSetSelectable(ServerCreator0);
    
ServerName TextDrawCreate(97.00000035.000000"BG] Black Bull Drift Gaming ]0.3.7");
    
TextDrawBackgroundColor(ServerName255);
    
TextDrawFont(ServerName2);
    
TextDrawLetterSize(ServerName0.6000004.000000);
    
TextDrawColor(ServerName, -1);
    
TextDrawSetOutline(ServerName1);
    
TextDrawSetProportional(ServerName1);
    
TextDrawSetSelectable(ServerName0);
    
ServerStars TextDrawCreate(198.00000080.000000"]]]]]]]]]]]]]]");
    
TextDrawBackgroundColor(ServerStars255);
    
TextDrawFont(ServerStars2);
    
TextDrawLetterSize(ServerStars0.5000001.000000);
    
TextDrawColor(ServerStars16711935);
    
TextDrawSetOutline(ServerStars0);
    
TextDrawSetProportional(ServerStars1);
    
TextDrawSetShadow(ServerStars1);
    
TextDrawSetSelectable(ServerStars0);
    
ServerWeb TextDrawCreate(239.000000375.000000"BB-GAMING.eu");
    
TextDrawBackgroundColor(ServerWeb255);
    
TextDrawFont(ServerWeb2);
    
TextDrawLetterSize(ServerWeb0.5000003.099998);
    
TextDrawColor(ServerWeb1009505736);
    
TextDrawSetOutline(ServerWeb1);
    
TextDrawSetProportional(ServerWeb1);
    
TextDrawSetSelectable(ServerWeb0);
    return 
1;
}
stock ShowLoginTextdraws(playerid)
{
    
TextDrawShowForPlayer(playeridTopBox);
    
TextDrawShowForPlayer(playeridBotBox);
    
TextDrawShowForPlayer(playeridTopLine);
    
TextDrawShowForPlayer(playeridBotLine);
    
TextDrawShowForPlayer(playeridServerCreator);
    
TextDrawShowForPlayer(playeridServerName);
    
TextDrawShowForPlayer(playeridServerStars);
    
TextDrawShowForPlayer(playeridServerWeb);
    return 
1;
}
stock HideLoginTextdraws(playerid)
{
    
TextDrawHideForPlayer(playeridTopBox);
    
TextDrawHideForPlayer(playeridBotBox);
    
TextDrawHideForPlayer(playeridTopLine);
    
TextDrawHideForPlayer(playeridBotLine);
    
TextDrawHideForPlayer(playeridServerCreator);
    
TextDrawHideForPlayer(playeridServerName);
    
TextDrawHideForPlayer(playeridServerStars);
    
TextDrawHideForPlayer(playeridServerWeb);
    return 
1;
}
stock DestroyLoginTextdraws()
{
    
TextDrawDestroy(TopBox);
    
TextDrawDestroy(BotBox);
    
TextDrawDestroy(TopLine);
    
TextDrawDestroy(BotLine);
    
TextDrawDestroy(ServerCreator);
    
TextDrawDestroy(ServerName);
    
TextDrawDestroy(ServerStars);
    
TextDrawDestroy(ServerWeb);
    return 
1;

This my code and I'm using name TopBox I'm not using another TopBox and its only bug my first textdraw. For that I created empty textdraw. I'm using this stocks under OnGameModeInit, OnGameModeExit, OnPlayerConnect
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)