Textdraw Not Updating
#1

my textdraw
pawn Код:
Textdraw0 = TextDrawCreate(423.000000, 439.000000, "-");

           TextDrawBackgroundColor(Textdraw0, 255);

           TextDrawFont(Textdraw0, 1);

           TextDrawLetterSize(Textdraw0, 0.170000, 0.699998);

           TextDrawColor(Textdraw0, -1);

           TextDrawSetOutline(Textdraw0, 1);

           TextDrawSetProportional(Textdraw0, 1);

           TextDrawUseBox(Textdraw0, 1);

           TextDrawBoxColor(Textdraw0, 0x2C272755);

           TextDrawTextSize(Textdraw0, 651.000000, -60.000000);

 

           Textdraw1 = TextDrawCreate(423.000000, 432.000000, "-");

           TextDrawBackgroundColor(Textdraw1, 255);

           TextDrawFont(Textdraw1, 1);

           TextDrawLetterSize(Textdraw1, 0.170000, 0.699998);

           TextDrawColor(Textdraw1, -1);

           TextDrawSetOutline(Textdraw1, 1);

           TextDrawSetProportional(Textdraw1, 1);

           TextDrawUseBox(Textdraw1, 1);

           TextDrawBoxColor(Textdraw1, 0x2C272755);

           TextDrawTextSize(Textdraw1, 651.000000, -60.000000);

 

           Textdraw2 = TextDrawCreate(423.000000, 425.000000, "-");

           TextDrawBackgroundColor(Textdraw2, 255);

           TextDrawFont(Textdraw2, 1);

           TextDrawLetterSize(Textdraw2, 0.170000, 0.699998);

           TextDrawColor(Textdraw2, -1);

           TextDrawSetOutline(Textdraw2, 1);

           TextDrawSetProportional(Textdraw2, 1);

           TextDrawUseBox(Textdraw2, 1);

           TextDrawBoxColor(Textdraw2, 0x2C272755);

           TextDrawTextSize(Textdraw2, 651.000000, -60.000000);

 

           Textdraw3 = TextDrawCreate(423.000000, 418.000000, "-");

           TextDrawBackgroundColor(Textdraw3, 255);

           TextDrawFont(Textdraw3, 1);

           TextDrawLetterSize(Textdraw3, 0.170000, 0.699998);

           TextDrawColor(Textdraw3, -1);

           TextDrawSetOutline(Textdraw3, 1);

           TextDrawSetProportional(Textdraw3, 1);

           TextDrawUseBox(Textdraw3, 1);

           TextDrawBoxColor(Textdraw3, 0x2C272755);

           TextDrawTextSize(Textdraw3, 651.000000, -60.000000);

 

           Textdraw4 = TextDrawCreate(423.000000, 411.000000, "-");

           TextDrawBackgroundColor(Textdraw4, 255);

           TextDrawFont(Textdraw4, 1);

           TextDrawLetterSize(Textdraw4, 0.170000, 0.699998);

           TextDrawColor(Textdraw4, -1);

           TextDrawSetOutline(Textdraw4, 1);

           TextDrawSetProportional(Textdraw4, 1);

           TextDrawUseBox(Textdraw4, 1);

           TextDrawBoxColor(Textdraw4, 0x2C272755);

           TextDrawTextSize(Textdraw4, 651.000000, -60.000000);

 

           Textdraw5 = TextDrawCreate(423.000000, 404.000000, "-");

           TextDrawBackgroundColor(Textdraw5, 255);

           TextDrawFont(Textdraw5, 1);

           TextDrawLetterSize(Textdraw5, 0.170000, 0.699998);

           TextDrawColor(Textdraw5, -1);

           TextDrawSetOutline(Textdraw5, 1);

           TextDrawSetProportional(Textdraw5, 1);

           TextDrawUseBox(Textdraw5, 1);

           TextDrawBoxColor(Textdraw5, 0x2C272755);

           TextDrawTextSize(Textdraw5, 651.000000, -60.000000);

 

           Textdraw6 = TextDrawCreate(423.000000, 397.000000, "-");

           TextDrawBackgroundColor(Textdraw6, 255);

           TextDrawFont(Textdraw6, 1);

           TextDrawLetterSize(Textdraw6, 0.170000, 0.699998);

           TextDrawColor(Textdraw6, -1);

           TextDrawSetOutline(Textdraw6, 1);

           TextDrawSetProportional(Textdraw6, 1);

           TextDrawUseBox(Textdraw6, 1);

           TextDrawBoxColor(Textdraw6, 0x2C272755);

           TextDrawTextSize(Textdraw6, 651.000000, -60.000000);

 

           Textdraw7 = TextDrawCreate(423.000000, 390.000000, "-");

           TextDrawBackgroundColor(Textdraw7, 255);

           TextDrawFont(Textdraw7, 1);

           TextDrawLetterSize(Textdraw7, 0.170000, 0.699998);

           TextDrawColor(Textdraw7, -1);

           TextDrawSetOutline(Textdraw7, 1);

           TextDrawSetProportional(Textdraw7, 1);

           TextDrawUseBox(Textdraw7, 1);

           TextDrawBoxColor(Textdraw7, 0x2C272755);

           TextDrawTextSize(Textdraw7, 651.000000, -60.000000);

 

           Textdraw8 = TextDrawCreate(423.000000, 383.000000, "-");

           TextDrawBackgroundColor(Textdraw8, 255);

           TextDrawFont(Textdraw8, 1);

           TextDrawLetterSize(Textdraw8, 0.170000, 0.699998);

           TextDrawColor(Textdraw8, -1);

           TextDrawSetOutline(Textdraw8, 1);

           TextDrawSetProportional(Textdraw8, 1);

           TextDrawUseBox(Textdraw8, 1);

           TextDrawBoxColor(Textdraw8, 0x2C272755);

           TextDrawTextSize(Textdraw8, 651.000000, -60.000000);

 

           Textdraw9 = TextDrawCreate(423.000000, 376.000000, "-");

           TextDrawBackgroundColor(Textdraw9, 255);

           TextDrawFont(Textdraw9, 1);

           TextDrawLetterSize(Textdraw9, 0.170000, 0.699998);

           TextDrawColor(Textdraw9, -1);

           TextDrawSetOutline(Textdraw9, 1);

           TextDrawSetProportional(Textdraw9, 1);

           TextDrawUseBox(Textdraw9, 1);

           TextDrawBoxColor(Textdraw9, 0x2C272755);

           TextDrawTextSize(Textdraw9, 651.000000, -60.000000);

 

           Textdraw10 = TextDrawCreate(423.000000, 369.000000, "-");

           TextDrawBackgroundColor(Textdraw10, 255);

           TextDrawFont(Textdraw10, 1);

           TextDrawLetterSize(Textdraw10, 0.170000, 0.699998);

           TextDrawColor(Textdraw10, -1);

           TextDrawSetOutline(Textdraw10, 1);

           TextDrawSetProportional(Textdraw10, 1);

           TextDrawUseBox(Textdraw10, 1);

           TextDrawBoxColor(Textdraw10, 0x2C272755);

           TextDrawTextSize(Textdraw10, 651.000000, -60.000000);
my stock
pawn Код:
stock SendBoxMsg(string[])
{
   if(CurrentMsg == 0)
   {
     TextDrawShowForAll(Textdraw0);
     TextDrawSetString(Textdraw0,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 1)
   {
     TextDrawShowForAll(Textdraw1);
     TextDrawSetString(Textdraw1,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 2)
   {
     TextDrawShowForAll(Textdraw2);
     TextDrawSetString(Textdraw2,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 3)
   {
     TextDrawShowForAll(Textdraw3);
     TextDrawSetString(Textdraw3,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 4)
   {
     TextDrawShowForAll(Textdraw4);
     TextDrawSetString(Textdraw4,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 5)
   {
     TextDrawShowForAll(Textdraw5);
     TextDrawSetString(Textdraw5,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 6)
   {
     TextDrawShowForAll(Textdraw6);
     TextDrawSetString(Textdraw6,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 7)
   {
     TextDrawShowForAll(Textdraw7);
     TextDrawSetString(Textdraw7,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 8)
   {
     TextDrawShowForAll(Textdraw8);
     TextDrawSetString(Textdraw8,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 9)
   {
     TextDrawShowForAll(Textdraw9);
     TextDrawSetString(Textdraw9,string);
     CurrentMsg++;
   }
   else if(CurrentMsg == 10)
   {
     TextDrawShowForAll(Textdraw10);
     TextDrawSetString(Textdraw10,string);
     CurrentMsg++;
   }
   else if(CurrentMsg >= 12)
   {
     CurrentMsg = 0;
   }
}
OnPlayerDisconnect & OnPlayerConnect

pawn Код:
public OnPlayerConnect(playerid)
{
    new name[24],string[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof string,"%s has ~g~joined ~w~the server",name);
    SendBoxMsg(string);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new name[24]; GetPlayerName(playerid,name,sizeof(name));
    new string[128];
    switch(reason)
    {
      case 0: format(string,sizeof string,"%s has ~r~left ~w~the server. ~r~(Timed out)",name);
      case 1: format(string,sizeof string,"%s has ~r~left ~w~the server. ~r~(Leaving)",name);
      case 2: format(string,sizeof string,"%s has ~r~left ~w~the server. ~r~(Kicked/Banned)",name);
    }
    SendBoxMsg(string);
    return 1;
}

the problem guys is when all textdraw is occupied "10 textdraw used" its not updating anymore and its not showing new people/player join or left the server. can anyone help me making this continue? and hide the old players textdraw join/leave when new player joins/left the server to those who can help me + rep!
Reply
#2

i think that is the best way to use: Texdrawshowforplayer and texdraw hide for player........
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)