[HELP]Onplayerclicktextdraw
#1

Tektdrav bites me when I want to go further and put himself back under OnPlayerClickPlayerTextdraw or does not respond to me click on it

PHP код:
public OnPlayerClickPlayerTextDrawplayeridPlayerText:playertextid ) {
if( 
_:playertextid != INVALID_TEXT_DRAW ) {
    if( 
playertextid == KladionicaSMplayerid ][ 31 ] ) {
    new 
str128 ];
    
strdelDialogStrgEx0sizeofDialogStrgEx ) );
    
strcatDialogStrgExstr );
    for(  new 
010i++ )
    {
    
formatstrsizeofstr ), "%s vs %s\n"bettingInfoParovi][ parID ][ ] ][ teamName ], bettingInfoParovi][ parID ][ ] ][ teamName ] );
    
strcatDialogStrgExstr );
    }
    
SPDplayeriddialog_UPLATITIKETDSL"Izaberi par:"DialogStrgEx"Izaberi""Odustani" );
    
strdelDialogStrgEx0sizeofDialogStrgEx ));
    return 
true;
}
//Kupi sat
    
if( playertextid == buyWatchplayerid ][ ] ) {
    new 
text30 ];
    if( 
WatchModelplayerid ] == 19039 ) {
    if( 
GetPlayerMoney(playerid) < 4980 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -4980 );
    
text "Rolex Datejust za 4980 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19039;
    }
    else if( 
WatchModelplayerid ] == 19040 ) {
    if( 
GetPlayerMoney(playerid) < 6180 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -6180 );
    
text "Emporio Armani za 6180 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19040;
    }
    else if( 
WatchModelplayerid ] == 19041 ) {
    if( 
GetPlayerMoney(playerid) < 7230 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -7230 );
    
text "Casio G-Shock za 7230 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19041;
    }
    else if( 
WatchModelplayerid ] == 19042 ) {
    if( 
GetPlayerMoney(playerid) < 8190 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -8190 );
    
text "Michael Kors za 8190 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19042;
    }
    else if( 
WatchModelplayerid ] == 19043 ) {
    if( 
GetPlayerMoney(playerid) < 9160 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -9160 );
    
text "Hugo Boss za 9160 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19043;
    }
    
SendInfoMessageplayerid"Uspesno si kupio sat marke %s.( koristi komandu /time )."text );
    
buyWatchTDControlplayeridfalse );
    return 
true;
    }
    if( 
playertextid == buyWatchplayerid ][ ] ) {
    
SendInfoMessageplayerid"Odustali ste od kupovine sata." );
    
buyWatchTDControlplayeridfalse );
    return 
true;
    }
    if( 
playertextid == buyWatchplayerid ][ ] ) {
    new 
text30 ];
    if( 
WatchModelplayerid ] == 19043 ) return 1;
    
WatchModelplayerid ]++;
    
PlayerTextDrawSetPreviewModelplayeridbuyWatchplayerid ][ ], WatchModelplayerid ] );
    
PlayerTextDrawShowplayeridbuyWatchplayerid ][ ] );
    if( 
WatchModelplayerid ] == 19039 text "Rolex Datejust - 4980 rsd";
    else if( 
WatchModelplayerid ] == 19040 text "Emporio Armani - 6180 rsd";
    else if( 
WatchModelplayerid ] == 19041 text "Casio G-Shock - 7230 rsd";
    else if( 
WatchModelplayerid ] == 19042 text "Michael Kors - 8190 rsd";
    else if( 
WatchModelplayerid ] == 19043 text "Hugo Boss - 9160 rsd";
    
PlayerTextDrawSetStringplayeridbuyWatchplayerid ][ ], text );
    return 
true;
    }
    if( 
playertextid == buyWatchplayerid ][ ] ) {
    new 
text30 ];
    if( 
WatchModelplayerid ] == 19039 ) return 1;
    
WatchModelplayerid ]--;
    
PlayerTextDrawSetPreviewModelplayeridbuyWatchplayerid ][ ], WatchModelplayerid ] );
    
PlayerTextDrawShowplayeridbuyWatchplayerid ][ ] );
    if( 
WatchModelplayerid ] == 19039 text "Rolex Datejust - 4980 rsd";
    else if( 
WatchModelplayerid ] == 19040 text "Emporio Armani - 6180 rsd";
    else if( 
WatchModelplayerid ] == 19041 text "Casio G-Shock - 7230 rsd";
    else if( 
WatchModelplayerid ] == 19042 text "Michael Kors - 8190 rsd";
    else if( 
WatchModelplayerid ] == 19043 text "Hugo Boss - 9160 rsd";
    
PlayerTextDrawSetStringplayeridbuyWatchplayerid ][ ], text );
    return 
true;
    }
}
return 
1;

PHP код:
stock buyWatchTDControlplayeridbool:show ) {
    if( 
show == true ) {
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,410.000000170.000000"  ");
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.50000012.399997);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawUseBox(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawBoxColor(playerid,buyWatchplayerid ][ ], 100);
        
PlayerTextDrawTextSize(playerid,buyWatchplayerid ][ ], 230.0000000.000000);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 0);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,230.000000165.000000"  ");
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], );
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 5);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.5000001.000000);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawUseBox(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawBoxColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawTextSize(playerid,buyWatchplayerid ][ ], 180.000000100.000000);
        
PlayerTextDrawSetPreviewModel(playeridbuyWatchplayerid ][ ], 19039);
        
PlayerTextDrawSetPreviewRot(playeridbuyWatchplayerid ][ ], 0.00000090.00000010.0000001.000000);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 0);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,319.000000256.000000"Rolex Datejust - 4980 rsd");
        
PlayerTextDrawAlignment(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.3000001.000000);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 0);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,319.000000269.000000"kupi_sat");
        
PlayerTextDrawTextSize(playerid,buyWatchplayerid ][ ], 40.00000020.000000);
        
PlayerTextDrawAlignment(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.3000001.000000);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,382.000000270.000000"ld_beat:right");
        
PlayerTextDrawAlignment(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 4);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.3000001.000000);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawUseBox(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawBoxColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawTextSize(playerid,buyWatchplayerid ][ ], 20.00000010.000000);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,236.000000270.000000"ld_beat:left");
        
PlayerTextDrawAlignment(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 4);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.3000001.000000);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawUseBox(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawBoxColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawTextSize(playerid,buyWatchplayerid ][ ], 20.00000010.000000);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,316.000000264.000000"-");
        
PlayerTextDrawAlignment(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 2);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 13.7000160.499999);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 0);
        
buyWatchplayerid ][ ] = CreatePlayerTextDraw(playerid,384.000000169.000000"ld_beat:cross");
        
PlayerTextDrawBackgroundColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawFont(playerid,buyWatchplayerid ][ ], 4);
        
PlayerTextDrawLetterSize(playerid,buyWatchplayerid ][ ], 0.5000001.000000);
        
PlayerTextDrawColor(playerid,buyWatchplayerid ][ ], -1);
        
PlayerTextDrawSetOutline(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetProportional(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawSetShadow(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawUseBox(playerid,buyWatchplayerid ][ ], 1);
        
PlayerTextDrawBoxColor(playerid,buyWatchplayerid ][ ], 255);
        
PlayerTextDrawTextSize(playerid,buyWatchplayerid ][ ], 21.00000011.000000);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 0);
        
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
        for( new 
08i++ ) {
            
PlayerTextDrawShowplayeridbuyWatchplayerid ][ ] );
        }
        
SelectTextDrawplayeridSANMARINO );
    }
    else if( 
show == false ) {
        for( new 
08++) {
            
PlayerTextDrawHideplayeridbuyWatchplayerid ][ ] );
            
PlayerTextDrawDestroyplayeridbuyWatchplayerid ][ ] );
            
buyWatchplayerid ][ ] = PlayerText:INVALID_TEXT_DRAW;
        }
        
CancelSelectTextDrawplayerid );
    }

Reply
#2

Bump pls
Reply
#3

remove this check
PHP код:
if( _:playertextid != INVALID_TEXT_DRAW 
and you are not making textdraws selectable
PHP код:
PlayerTextDrawSetSelectable(playeridTextDraw1);  // not 0, you doing 0 
Reply
#4

Show textdraw or not responding click textdraw
Reply
#5

Huh?
Reply
#6

http://i.imgur.com/USGpFkh.jpg no next,back
Add PlayerTextDrawSetSelectable(playerid,buyWatch[ playerid ][ 3 ], 1);
Reply
#7

Show me the new code again
Reply
#8

PHP код:
 if( playertextid == buyWatchplayerid ][ ] ) {
    new 
text30 ];
    if( 
WatchModelplayerid ] == 19039 ) {
    if( 
GetPlayerMoney(playerid) < 4980 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -4980 );
    
text "Rolex Datejust za 4980 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19039;
    }
    else if( 
WatchModelplayerid ] == 19040 ) {
    if( 
GetPlayerMoney(playerid) < 6180 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -6180 );
    
text "Emporio Armani za 6180 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19040;
    }
    else if( 
WatchModelplayerid ] == 19041 ) {
    if( 
GetPlayerMoney(playerid) < 7230 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -7230 );
    
text "Casio G-Shock za 7230 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19041;
    }
    else if( 
WatchModelplayerid ] == 19042 ) {
    if( 
GetPlayerMoney(playerid) < 8190 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -8190 );
    
text "Michael Kors za 8190 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19042;
    }
    else if( 
WatchModelplayerid ] == 19043 ) {
    if( 
GetPlayerMoney(playerid) < 9160 ) return SendErrorMessageplayerid"Nemate dovoljno novca." );
    
GivePlayerMoneyplayerid, -9160 );
    
text "Hugo Boss za 9160 rsd";
    
PlayerInfoplayerid ][ pWatch ] = 19043;
    }
    
SendInfoMessageplayerid"Uspesno si kupio sat marke %s.( koristi komandu /time )."text );
    
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
    
buyWatchTDControlplayeridfalse );
    return 
true;
    }
    if( 
playertextid == buyWatchplayerid ][ ] ) {
    
SendInfoMessageplayerid"Odustali ste od kupovine sata." );
    
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
    
buyWatchTDControlplayeridfalse );
    return 
true;
    }
    if( 
playertextid == buyWatchplayerid ][ ] ) {
    new 
text30 ];
    if( 
WatchModelplayerid ] == 19043 ) return 1;
    
WatchModelplayerid ]++;
    
PlayerTextDrawSetPreviewModelplayeridbuyWatchplayerid ][ ], WatchModelplayerid ] );
    
PlayerTextDrawShowplayeridbuyWatchplayerid ][ ] );
    if( 
WatchModelplayerid ] == 19039 text "Rolex Datejust - 4980 rsd";
    else if( 
WatchModelplayerid ] == 19040 text "Emporio Armani - 6180 rsd";
    else if( 
WatchModelplayerid ] == 19041 text "Casio G-Shock - 7230 rsd";
    else if( 
WatchModelplayerid ] == 19042 text "Michael Kors - 8190 rsd";
    else if( 
WatchModelplayerid ] == 19043 text "Hugo Boss - 9160 rsd";
    
PlayerTextDrawSetStringplayeridbuyWatchplayerid ][ ], text );
    
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
    return 
true;
    }
    if( 
playertextid == buyWatchplayerid ][ ] ) {
    new 
text30 ];
    if( 
WatchModelplayerid ] == 19039 ) return 1;
    
WatchModelplayerid ]--;
    
PlayerTextDrawSetPreviewModelplayeridbuyWatchplayerid ][ ], WatchModelplayerid ] );
    
PlayerTextDrawShowplayeridbuyWatchplayerid ][ ] );
    if( 
WatchModelplayerid ] == 19039 text "Rolex Datejust - 4980 rsd";
    else if( 
WatchModelplayerid ] == 19040 text "Emporio Armani - 6180 rsd";
    else if( 
WatchModelplayerid ] == 19041 text "Casio G-Shock - 7230 rsd";
    else if( 
WatchModelplayerid ] == 19042 text "Michael Kors - 8190 rsd";
    else if( 
WatchModelplayerid ] == 19043 text "Hugo Boss - 9160 rsd";
    
PlayerTextDrawSetStringplayeridbuyWatchplayerid ][ ], text );
    
PlayerTextDrawSetSelectable(playerid,buyWatchplayerid ][ ], 1);
    return 
true;
    } 
Reply
#9

BUMP
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)