SA-MP Forums Archive
PlayerTextDraw - not hiding - 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: PlayerTextDraw - not hiding (/showthread.php?tid=623887)



PlayerTextDraw - not hiding - TheRohlikar - 07.12.2016

Hello,

I got a problem with PlayerTextDraw.

I am creating TextDraws from database. No problem, they create.
But when I do not wanna show him (and I won't), it's still there... Any idea why ?

PHP код:
forward OnPlayerTextDrawGroup(playerid, txd_group[], name[], except_1, except_2);//OnPlayerLogin
public OnPlayerTextDrawGroup(playerid, txd_group[], name[], except_1, except_2){
    new 
rows; cache_get_row_count(rows);
    new 
str[10]; format(str, sizeof(str), "ROWS: %d", rows);
    
SendClientMessage(playerid, -1, str);
    if(
rows != 0){
        for(new 
i=0;i<rows;i++){ // tid starts on '1'
            
if(i != except_1 && i != except_2) {
                if(
Txds[i][playerid]) { PlayerTextDrawDestroy(playerid, Txds[i][playerid]); printf("TEXTDRAW %d EXISTS ALREADY, DESTROYING!", i); }
                new
                    
Float:X, Float:Y,
                    
text[30],
                    
Float:LSX, Float:LSY,
                    
Float:TSX, Float:TSY,
                    
align,
                    
color,
                    
usebox, boxcolor,
                    
setshadow,
                    
outline, backgroundcolor,
                    
font,
                    
proportional,
                    
selectable;
                
cache_get_value_float(      i,      "posX",                 X);
                
cache_get_value_float(      i,      "posY",                 Y);
                
cache_get_value_float(      i,      "LetterSizeX",             LSX);
                
cache_get_value_float(      i,      "LetterSizeY",             LSY);
                
cache_get_value_float(      i,      "TextSizeX",             TSX);
                
cache_get_value_float(      i,      "TextSizeY",             TSY);
                
cache_get_value(    i,      "text",     text, sizeof(text));
                
cache_get_value_int(    i,      "alignment",                align);
                
cache_get_value_int(    i,      "color",                    color);
                
cache_get_value_int(    i,      "usebox",                    usebox);
                
cache_get_value_int(    i,      "boxcolor",                    boxcolor);
                
cache_get_value_int(    i,      "setshadow",                setshadow);
                
cache_get_value_int(    i,      "outline",                    outline);
                
cache_get_value_int(    i,      "backgroundcolor",            backgroundcolor);
                
cache_get_value_int(    i,      "font",                        font);
                
cache_get_value_int(    i,      "proportional",                proportional);
                
cache_get_value_int(    i,      "selectable",                selectable);
                  if(
i == CHAR_TXD_NAME) {
                      if(
strcmp(name, ""))Txds[i][playerid] = CreatePlayerTextDraw(playerid, X, Y, text);
                      else 
Txds[i][playerid] = CreatePlayerTextDraw(playerid, X, Y, name);
                }else 
Txds[i][playerid] = CreatePlayerTextDraw(playerid, X, Y, text);
                
PlayerTextDrawLetterSize(playerid, Txds[i][playerid], LSX, LSY);
                
PlayerTextDrawTextSize(playerid, Txds[i][playerid], TSX, TSY);
                
PlayerTextDrawAlignment(playerid, Txds[i][playerid], align);
                
PlayerTextDrawColor(playerid, Txds[i][playerid], color);
                
PlayerTextDrawUseBox(playerid, Txds[i][playerid], usebox);
                
PlayerTextDrawBoxColor(playerid, Txds[i][playerid], boxcolor);
                
PlayerTextDrawSetShadow(playerid, Txds[i][playerid], setshadow);
                
PlayerTextDrawSetOutline(playerid, Txds[i][playerid], outline);
                
PlayerTextDrawBackgroundColor(playerid, Txds[i][playerid], backgroundcolor);
                
PlayerTextDrawFont(playerid, Txds[i][playerid], font);
                
PlayerTextDrawSetProportional(playerid, Txds[i][playerid], proportional);
                
PlayerTextDrawSetSelectable(playerid, Txds[i][playerid], selectable);
                
PlayerTextDrawShow(playerid, Txds[i][playerid]);
                
printf("TEXTDRAW %d CREATED", i);
            }
        }
    }else 
printf("TEXTDRAW GROUP %s DOESN'T EXIST !", txd_group);
    return 
1;
} 
and when it shows, I can't click on that. I don't wanna see it.


Re: PlayerTextDraw - not hiding - TheRohlikar - 07.12.2016

I deleted an "MAX_PLAYERS" array in "Txds"... still same. (just saying)


Re: PlayerTextDraw - not hiding - TheRohlikar - 07.12.2016

aright, I am just an asshole... np