[HELP]Onplayerclicktextdraw
#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


Messages In This Thread
[HELP]OnPlayerClickPlayerTextdraw - by Markoni990 - 24.08.2016, 15:03
Re: [HELP]Onplayerclicktextdraw - by Markoni990 - 24.08.2016, 16:12
Re: [HELP]Onplayerclicktextdraw - by Shinja - 24.08.2016, 16:29
Re: [HELP]Onplayerclicktextdraw - by Markoni990 - 24.08.2016, 17:06
Re: [HELP]Onplayerclicktextdraw - by Shinja - 24.08.2016, 17:27
Re: [HELP]Onplayerclicktextdraw - by Markoni990 - 24.08.2016, 17:34
Re: [HELP]Onplayerclicktextdraw - by Shinja - 24.08.2016, 17:38
Re: [HELP]Onplayerclicktextdraw - by Markoni990 - 24.08.2016, 17:42
Re: [HELP]Onplayerclicktextdraw - by Markoni990 - 25.08.2016, 13:50

Forum Jump:


Users browsing this thread: 1 Guest(s)