TD Select
#1

1. So... I create TextDraw for change color
PHP код:
for(new i=1sizeof(ChangeColor); i++) 
    { 
        
ChangeColor[i] = TextDrawCreate(XY"box"); 
        
TextDrawLetterSize(ChangeColor[i], 0.01.426062); 
        
TextDrawTextSize(ChangeColor[i], 400.0); 
        
TextDrawAlignment(ChangeColor[i], 1); 
        
TextDrawColor(ChangeColor[i], -1); 
        
TextDrawUseBox(ChangeColor[i], 1); 
        
TextDrawBoxColor(ChangeColor[i], Colors[i]); 
        
TextDrawSetOutline(ChangeColor[i], 0); 
        
TextDrawBackgroundColor(ChangeColor[i], 255); 
        
TextDrawFont(ChangeColor[i], 1); 
        
TextDrawSetProportional(ChangeColor[i], 1); 
        
TextDrawSetShadow(ChangeColor[i], 0); 
        
TextDrawSetSelectable(ChangeColor[i], 1); 
        
25
        
count++; 
        if(
count == 4)  
        { 
            
30.0
            
25.0
            
count 1
        } 
    } 
2. Add TextDrawSetSelectable

3. Add the display of these TD for players

So I deduce that while TD, and their outputs normally
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys

    if(
newkeys == KEY_SUBMISSION
    { 
        for(new 
isizeof(ChangeColor); i++) 
        { 
            
TextDrawShowForPlayer(playerid,ChangeColor[i]); 
        } 
        
SelectTextDraw(playerid0xFF4040AA) ; 
    } 
    return 
1

And continue problem !!

Public this does not work
PHP код:
public OnPlayerClickTextDraw(playeridText:clickedid

    print(
"OnPlayerClickTextDraw 1"); 
    if (
_:clickedid == INVALID_TEXT_DRAW 
    { 
        print(
"OnPlayerClickTextDraw 2"); 
        for(new 
isizeof(ChangeColor); i++) 
        { 
            
TextDrawHideForPlayer(playerid,ChangeColor[i]); 
        } 
    } 
    for(new 
isizeof(ChangeColor); i++) 
    { 
        print(
"OnPlayerClickTextDraw 3"); 
        if(
clickedid == ChangeColor[i]) 
        { 
            
SetPlayerColorplayeridColors] ); 
            
CancelSelectTextDrawplayerid ) ; 
            for(new 
jsizeof(ChangeColor); j++) 
            { 
                
TextDrawHideForPlayer(playerid,ChangeColor[j]); 
            } 
        } 
    } 
     
    return 


Original post (RU): https://sampforum.blast.hk/showthread.php?tid=568742
Reply
#2

Sigh. Read the wiki for once. It's hard to not notice the big red warning box.
Reply
#3

Well ... I changed the size of the text, it is now no negative and not 0. But Public OnPlayerClickTextDraw still is not called
Reply
#4

Okay...
I nоt all changed. Now all work. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)