SA-MP Forums Archive
TD Select - 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: TD Select (/showthread.php?tid=568743)



TD Select - SkyLoKi - 24.03.2015

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


Re: TD Select - Vince - 24.03.2015

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


Re: TD Select - SkyLoKi - 24.03.2015

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


Re: TD Select - SkyLoKi - 24.03.2015

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