31.07.2013, 18:27
Hi all I have a problem with the gui
https://www.youtube.com/watch?v=OCGvTzUc4GYscript lines
Код:
if ( pickupid == Pickups[ 58 ] ) { if ( accountsDB[ playerid ][ Job ] != 5 )return SendClientMessage( playerid, -1,"Teslos pakrovimas tik Furistu darbuotojams!" ); new Float:x, Float:y, Float:z; GetVehiclePos( vehicleID[ playerid ], x, y, z ); if ( !IsPlayerInRangeOfPoint( playerid, 9.0, 1429.8214,1063.5714,10.8203 ) )return SendClientMessage( playerid, -1,"Fura yra per toli!" ); if ( !IsTrailerAttachedToVehicle( vehicleID[ playerid ] ) ) return SendClientMessage( playerid,-1, "Nera prikabinta priekaba!" ); if ( GetVehicleModel( GetVehicleTrailer( vehicleID[ playerid ] ) ) != 435 ) return SendClientMessage( playerid, -1,"Neprikabinta priekaba!" ); if ( Uzkrauta[ GetVehicleTrailer( vehicleID[ playerid ] ) ][ 0 ] > 1 ) return SendClientMessage( playerid, -1,"Furoje jau uћkrauta" ); ShowPlayerDialog( playerid, DIALOG_SHOW_TESLA, DIALOG_STYLE_MSGBOX, "Tesla", "Jei norite pasikrauti teslos spauskite 1\n", "Pasikrauti", "Atsaukti" ); return 1; } if ( pickupid == Pickups[ 59 ] ) { if ( accountsDB[ playerid ][ Job ] != 5 )return SendClientMessage( playerid, -1,"Teslos pakrovimas tik Furistu darbuotojams!" ); new Float:x, Float:y, Float:z; GetVehiclePos( vehicleID[ playerid ], x, y, z ); if ( !IsPlayerInRangeOfPoint( playerid, 9.0, x, y, z ) )return SendClientMessage( playerid,-1, "Fura yra per toli!" ); if ( !IsTrailerAttachedToVehicle( vehicleID[ playerid ] ) ) return SendClientMessage( playerid, -1,"Nera prikabinta priekaba!" ); if ( GetVehicleModel( GetVehicleTrailer( vehicleID[ playerid ] ) ) != 435 ) return SendClientMessage( playerid, -1,"Neprikabinta priekaba!" ); GivePlayerMoneyEx( playerid, Uzkrauta[ GetVehicleTrailer( vehicleID[ playerid ] ) ][ 0 ]*3000 ); GameTextForPlayer( playerid, "~y~Krovinis Pristatytas!", 4000, 4 ); Uzkrauta[ GetVehicleTrailer( vehicleID[ playerid ] ) ][ 0 ] = 0; Delete3DTextLabel( UzkrautaLabel[ GetVehicleTrailer( vehicleID[ playerid ] ) ]); SetVehicleToRespawn( GetVehicleTrailer( vehicleID[ playerid ] ) ); return 1; }
Код:
case DIALOG_SHOW_TESLA: { if ( response ) { new ammount; if ( sscanf( inputtext, "i", ammount ) ) ShowPlayerDialog( playerid, DIALOG_SHOW_TESLA, DIALOG_STYLE_MSGBOX, "Tesla", "Irasykite kiek tonu teslos norite uzsikrauti!\n", "Pasikrauti", "Atsaukti" ); else if ( ammount > 1 ) ShowPlayerDialog( playerid, DIALOG_SHOW_TESLA, DIALOG_STYLE_MSGBOX, "Tesla", "Jei norite pasikrauti teslos spauskite 1\n", "Pasikrauti", "Atsaukti" ); else { Uzkrauta[ GetVehicleTrailer( vehicleID[ playerid ] ) ][ 0 ] += ammount; new str[ 31 ]; format( str, 31, "Pakrauta: Teslos!", ammount ); UzkrautaLabel[ GetVehicleTrailer( vehicleID[ playerid ] )] = Create3DTextLabel( str, COLOR_GREEN, 0.0, 0.0, 0.0, 50.0, 1 ); Attach3DTextLabelToVehicle( UzkrautaLabel[ GetVehicleTrailer( vehicleID[ playerid ] )], GetVehicleTrailer( vehicleID[ playerid ] ) ,0.0, 0.0, 2.0 ); } } return 1; }