Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public OnPlayerClickPlayerTextDraw( playerid, PlayerText:playertextid )
- {
- if( _:playertextid != INVALID_TEXT_DRAW )
- {
- if( playertextid == BuyCar[ playerid ][ 1 ] )
- {
- new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
- if( as != -1 )
- {
- if( ModelCar[ playerid ] == (AutoSalon[ as ][ aMaxVehModel ]-1) ) return 1;
- ModelCar[ playerid ]++;
- new string[ 128 ];
- format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 3 ], string );
- format( string, sizeof( string ), "~w~%d$", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], string );
- format( string, sizeof( string ), "~w~%dg", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 2 ] );
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 11 ], string );
- PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 5 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
- PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 5 ] );
- PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 12 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
- PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 12 ] );
- PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 9 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
- PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 9 ] );
- SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
- SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );
- Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
- VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], AutoSalonBojaVozila[ playerid ], AutoSalonBojaVozila[ playerid ], -1 );
- SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
- LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
- //==============================================================================//////
- if( VoziloJeDizel( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Dizel" );
- }
- else if( VoziloJeBenzin( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Benzin" );
- }
- else if( VoziloJeKerozin( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Kerozin" );
- }
- else if( VoziloNemaGorivo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~N/A" );
- }
- //==============================================================================///////
- if( VoziloJe2Vrata( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~2" );
- }
- else if( VoziloJe4Vrata( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~4" );
- }
- else if( VoziloNemaVrata( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~0" );
- }
- //==============================================================================////////////////
- if( SportVozilo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~sportsko" );
- }
- else if( PutnickoVozilo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~putnicko" );
- }
- else if( IsVehicleMotor( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~motocikl" );
- }
- else if( IsVehicleBajs( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~bicikl" );
- }
- else if( IsVehicleLetelica( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~letilica" );
- }
- else if( IsVehicleBrod( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~plovilo" );
- }
- else if( TeretnoVozilo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~teretno" );
- }
- else
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~N/A" );
- }
- //==============================================================================//////////
- new Cboja1 = AutoSalonBojaVozila[ playerid ];
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ],Cboja1, Cboja1);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ],Cboja1, Cboja1);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ],Cboja1, Cboja1);
- SelectTextDraw( playerid, TGBOJA );
- }
- return true;
- }
- if( playertextid == BuyCar[ playerid ][ 4 ] )
- {
- new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
- if( as != -1 )
- {
- if( ModelCar[ playerid ] == 0 ) return 1;
- ModelCar[ playerid ]--;
- new string[ 128 ];
- format( string, sizeof( string ), "%s", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 3 ], string );
- format( string, sizeof( string ), "~w~%d$", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 1 ] );
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 7 ], string );
- format( string, sizeof( string ), "~w~%dg", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ][ 2 ] );
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 11 ], string );
- PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 5 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
- PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 5 ] );
- PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 12 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
- PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 12 ] );
- PlayerTextDrawSetPreviewModel( playerid, BuyCar[ playerid ][ 9 ],AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ] );
- PlayerTextDrawShow( playerid, BuyCar[ playerid ][ 9 ] );
- SetPlayerCameraPos( playerid, AutoSalon[ as ][ aCameraPos ][ 0 ], AutoSalon[ as ][ aCameraPos ][ 1 ], AutoSalon[ as ][ aCameraPos ][ 2 ] );
- SetPlayerCameraLookAt( playerid, AutoSalon[ as ][ aCameraLookAt ][ 0 ], AutoSalon[ as ][ aCameraLookAt ][ 1 ], AutoSalon[ as ][ aCameraLookAt ][ 2 ] );
- Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
- VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], AutoSalonBojaVozila[ playerid ], AutoSalonBojaVozila[ playerid ], -1 );
- SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
- LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
- //==============================================================================//////
- if( VoziloJeDizel( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Dizel" );
- }
- else if( VoziloJeBenzin( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Benzin" );
- }
- else if( VoziloJeKerozin( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~Kerozin" );
- }
- else if( VoziloNemaGorivo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 17 ], "Gorivo: ~w~N/A" );
- }
- //==============================================================================///////
- if( VoziloJe2Vrata( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~2" );
- }
- else if( VoziloJe4Vrata( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~4" );
- }
- else if( VoziloNemaVrata( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 18 ], "Broj vrata: ~w~0" );
- }
- //==============================================================================////////////////
- if( SportVozilo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~sportsko" );
- }
- else if( PutnickoVozilo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~putnicko" );
- }
- else if( IsVehicleMotor( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~motocikl" );
- }
- else if( IsVehicleBajs( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~bicikl" );
- }
- else if( IsVehicleLetelica( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~letilica" );
- }
- else if( IsVehicleBrod( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~plovilo" );
- }
- else if( TeretnoVozilo( VehicleInfo[ slotid ][ vID ] ) )
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~teretno" );
- }
- else
- {
- PlayerTextDrawSetString( playerid, BuyCar[ playerid ][ 19 ], "Vrsta: ~w~N/A" );
- }
- //==============================================================================//////////
- new Cboja1 = AutoSalonBojaVozila[ playerid ];
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ],Cboja1, Cboja1);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ],Cboja1, Cboja1);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ],Cboja1, Cboja1);
- SelectTextDraw( playerid, TGBOJA );
- }
- return true;
- }
- if( playertextid == BuyCar[ playerid ][ 8 ] )
- {
- new as = GetNearestSalon( playerid ), slotid = AutoSalon[ as ][ aIzlogVeh ];
- if( as != -1 )
- {
- AutoSalon[ as ][ AlreadyBuying ] = false;
- PlayerBuyingAS[ playerid ] = -1;
- AutoSalonBojaVozila[ playerid ] = -1;
- ModelCar[ playerid ] = 0;
- Dimi_DestroyVehicle( VehicleInfo[ slotid ][ vID ] );
- VehicleInfo[ slotid ][ vID ] = Dimi_CreateVehicle( slotid, VehicleInfo[ slotid ][ vUsage ], VehicleInfo[ slotid ][ vOrganization ], VehicleInfo[ slotid ][ vJob ], VehicleInfo[ slotid ][ vFuelProperty ], AutoSalon[ as ][ aVehModel ][ 0 ], VehicleInfo[ slotid ][ vLokacijaX ], VehicleInfo[ slotid ][ vLokacijaY ], VehicleInfo[ slotid ][ vLokacijaZ ]+1.0, VehicleInfo[ slotid ][ vLokacijaA ], -1, -1, -1 );
- SetVehicleVirtualWorld( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aVW ] );
- LinkVehicleToInterior( VehicleInfo[ slotid ][ vID ], AutoSalon[ as ][ aInt ] );
- BuyCarTDControl( playerid, false );
- BojaVozilaTDControl( playerid, false );
- TogPlayerHud( playerid );
- TogglePlayerControllable( playerid, true );
- SetCameraBehindPlayer( playerid );
- CancelSelectTextDraw( playerid );
- }
- return true;
- }
- if( playertextid == BuyCar[ playerid ][ 10 ] )
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 ) {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- //printf("Igrac %d - BuyCar PTD 1 test kliknuo",playerid);
- strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________\n");
- format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "TG_BOJA"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
- strcat( DialogStrgEx, globalstring );
- format( globalstring, sizeof( globalstring ),""col_white"Cena: "TG_BOJA"%dg zlata.\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 2 ] );
- strcat( DialogStrgEx, globalstring );
- strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________");
- ShowPlayerDialog( playerid, dialog_VEHGOLDBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", "Odustani" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
- }
- return true;
- }
- if( playertextid == BuyCar[ playerid ][ 6 ] )
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________\n");
- format( globalstring, sizeof( globalstring ),""col_white"Da li ste sigurni da zelite kupiti vozilo "TG_BOJA"%s.\n", ImeVozila[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]-400 ] );
- strcat( DialogStrgEx, globalstring );
- format( globalstring, sizeof( globalstring ),""col_white"Cena: "TG_BOJA"%d$.\n", VehPrice[ AutoSalon[ as ][ aVehModel ][ ModelCar[ playerid ] ]- 400 ][ 1 ] );
- strcat( DialogStrgEx, globalstring );
- strcat( DialogStrgEx, ""TG_BOJA"__________________________________________________________________");
- ShowPlayerDialog( playerid, dialog_VEHMONEYBUY, DSMSG, D_NASLOV, DialogStrgEx, "Kupi", "Odustani" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
- }
- return true;
- }
- ////////////////////////////////////////////////////////////////////////
- if( playertextid == ASBojaVozila[ 4 ] [ playerid ] )//crna
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 0;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 5 ] [ playerid ] )//bijela
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 1;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 6 ] [ playerid ] )//svijetlo plava
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 135;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 7 ] [ playerid ] )//crvena
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 3;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 8 ] [ playerid ] )//zelenoplava
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 165;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 9 ] [ playerid ] )//pink
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 126;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 10 ] [ playerid ] )//zuta
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 6;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 11 ] [ playerid ] )//zelena
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 191;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 12 ] [ playerid ] )//tamno ljubicasta
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 179;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 13 ] [ playerid ] )//svijetlo zelena
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 145;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 14 ] [ playerid ] )//narandjasta
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 219;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 15 ] [ playerid ] )//tamnoplava
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 93;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 16 ] [ playerid ] )//zelenoplava
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 155;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 17 ] [ playerid ] )//tamno siva
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 63;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- if( playertextid == ASBojaVozila[ 18 ] [ playerid ] )//tamno crvena
- {
- new as = GetNearestSalon( playerid );
- if( as != -1 )
- {
- AutoSalonBojaVozila[ playerid ] = 17;
- new slotid = AutoSalon[ as ][ aIzlogVeh ];
- new bojica = AutoSalonBojaVozila[ playerid ];
- ChangeVehicleColor(VehicleInfo[ slotid ][ vID ], bojica, bojica);
- //
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawHide(playerid, BuyCar[ playerid ][ 5 ]);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 12 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 9 ], bojica, bojica);
- PlayerTextDrawSetPreviewVehCol(playerid, BuyCar[ playerid ][ 5 ], bojica, bojica);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 12 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 9 ]);
- PlayerTextDrawShow(playerid, BuyCar[ playerid ][ 5 ]);
- }
- return true;
- }
- ////////////////////////////////////////////////////////////////////////
- if( playertextid == LicnaKartaTD[19][playerid] )
- {
- if( LicnaKartaShowed[ playerid ] == true )
- {
- LicnaKartaShowed[ playerid ] = false;
- LicnaKartaControl( playerid, false );
- }
- return true;
- }
- if( playertextid == KladionicaSM[ playerid ][ 31 ] ) {
- new str[ 128 ];
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- strcat( DialogStrgEx, str );
- for( new i = 0; i < 10; i++ ) {
- format( str, sizeof( str ), "%s vs %s\n", bettingInfo[ Parovi[ i ][ parID ][ 0 ] ][ teamName ], bettingInfo[ Parovi[ i ][ parID ][ 1 ] ][ teamName ] );
- strcat( DialogStrgEx, str );
- }
- SPD( playerid, dialog_UPLATITIKET, DSL, "Izaberi par:", DialogStrgEx, "Izaberi", "Odustani" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 17 ] ) {
- SPD( playerid, dialog_REGISTER, DSI, "Registracija", "Password moze sadrzavati minimalno 6, a maksimalno 20 znaka", "Registriraj", "Izadji" );
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 18 ] ) { // pol
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
- for( new i = 23; i < 30; i ++) {
- PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
- }
- BiraPol[ playerid ] = 1;
- BiraSkin[ playerid ] = 0;
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 29 ] ) { // desno
- if( BiraPol[ playerid ] > 0 ) {
- if( BiraPol[ playerid ] == 1 ) {
- BiraPol[ playerid ] = 2;
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Zensko");
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
- }
- else if( BiraPol[ playerid ] == 2 ) {
- BiraPol[ playerid ] = 1;
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
- }
- }
- if( BiraSkin[ playerid ] > 0 ) {
- if( RegSex[ playerid ] == 1 ) { // musko
- if( BiraSkin[ playerid ] == 4 ) BiraSkin[ playerid ] = 0;
- BiraSkin[ playerid ]++;
- PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
- }
- else if( RegSex[ playerid ] == 2 ) { // zensko
- if( BiraSkin[ playerid ] == 4 ) BiraSkin[ playerid ] = 0;
- BiraSkin[ playerid ]++;
- PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
- }
- }
- PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 29 ] );
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 28 ] ) { // levo
- if( BiraPol[ playerid ] > 0 ) {
- if( BiraPol[ playerid ] == 1 ) {
- BiraPol[ playerid ] = 2;
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Zensko");
- }
- else if( BiraPol[ playerid ] == 2 ) {
- BiraPol[ playerid ] = 1;
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], "Musko");
- }
- }
- if( BiraSkin[ playerid ] > 0 ) {
- if( RegSex[ playerid ] == 1 ) { // musko
- if( BiraSkin[ playerid ] == 1 ) BiraSkin[ playerid ] = 5;
- BiraSkin[ playerid ]--;
- PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
- }
- else if( RegSex[ playerid ] == 2 ) { // zensko
- if( BiraSkin[ playerid ] == 1 ) BiraSkin[ playerid ] = 5;
- BiraSkin[ playerid ]--;
- PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ];
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ BiraSkin[ playerid ]-1 ][ 0 ] );
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
- }
- }
- PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 29 ] );
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 27 ] ) { // izaberi
- if( BiraPol[ playerid ] > 0 ) {
- if( BiraPol[ playerid ] == 1 ) {
- PlayerInfo[ playerid ][ xPol ] = 1;
- RegSex[ playerid ] = 1;
- BiraPol[ playerid ] = 0;
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 18 ], "Musko");
- PlayerInfo[ playerid ][ xSkin ] = MaleSkinIDs[ 0 ][ 0 ];
- }
- else if( BiraPol[ playerid ] == 2 ) {
- PlayerInfo[ playerid ][ xPol ] = 2;
- RegSex[ playerid ] = 2;
- BiraPol[ playerid ] = 0;
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 18 ], "Zensko");
- PlayerInfo[ playerid ][ xSkin ] = FemaleSkinIDs[ 0 ][ 0 ];
- }
- }
- if( BiraSkin[ playerid ] > 0 ) {
- if( RegSex[ playerid ] == 1 ) {
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 22 ], MaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
- }
- else if( RegSex[ playerid ] == 2 ) {
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 22 ], FemaleSkinNames[ BiraSkin[ playerid ]-1 ][ 0 ] );
- }
- PlayerTextDrawLetterSize( playerid, RegisterTD[ playerid ][ 22 ], 0.200000, 1.000000 );
- PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 22 ] );
- BiraSkin[ playerid ] = 0;
- }
- for( new i = 23; i < 30; i ++) {
- PlayerTextDrawHide( playerid, RegisterTD[ playerid ][ i ] );
- }
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 22 ] ) { // skin
- for( new i = 23; i < 30; i ++) {
- PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ i ] );
- }
- if( RegSex[ playerid ] == 1 ) {
- PlayerInfo[ playerid ][ xSkin ] = 29;
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], MaleSkinNames[ 0 ][ 0 ] );
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], MaleSkinIDs[ 0 ][ 0 ] );
- }
- else if( RegSex[ playerid ] == 2 ) {
- PlayerTextDrawSetString( playerid, RegisterTD[ playerid ][ 26 ], FemaleSkinNames[ 0 ][ 0 ] );
- PlayerTextDrawSetPreviewModel( playerid, RegisterTD[ playerid ][ 24 ], FemaleSkinIDs[ 0 ][ 0 ] );
- }
- PlayerTextDrawShow( playerid, RegisterTD[ playerid ][ 22 ] );
- BiraPol[ playerid ] = 0;
- BiraSkin[ playerid ] = 1;
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 21 ] ) {
- SPD( playerid, dialog_COUNTRY, DSL, "Poreklo", "Srbija\nHrvatska\nMakedonija\nCrna Gora\nBosna i Hercegovina\nOstalo", "Odabir", "Izadji" );
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 20 ] ) {
- SPD( playerid, dialog_AGE, DSI, "Godine", "U prazni prostor ispod unesite vase godine\nMinimalno 12 maximalno 70", "Unos", "Izadji" );
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 19 ] ) {
- SPD(playerid, dialog_MAIL, DSI, "Mail", "U prazni prostor ispod unesite vasu e-mail adresu.\nE-mail adresa ce nam posluziti u vracanju vaseg passworda.", "Unos", "Izadji" );
- return true;
- }
- if( playertextid == RegisterTD[ playerid ][ 23 ] ) {
- if( InputPassword[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao lozinku." );
- if( ChoseCountry[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao poreklo." );
- if( InputAge[ playerid ] == false ) return GRESKA( playerid, "Nisi odabrao godine starosti." );
- if( InputMail[ playerid ] == false ) return GRESKA( playerid, "Nisi uneo email." );
- if( RegSex[ playerid ] == 0 ) return GRESKA( playerid, "Nisi odabrao drzavu." );
- CancelSelectTextDraw( playerid );
- IgracSeRegistruje[ playerid ] = false;
- RegisterTDControl( playerid, false );
- PlayerInfo[ playerid ][ xRegistrovan ] = 1;
- PlayerInfo[ playerid ][ xPocetniTut ] = 0;
- PlayerInfo[ playerid ][ xSpawn ] = SetRandomSpawn( playerid );
- PlayerInfo[ playerid ][ xLevel ] = ServerInfo[ PocetniLevel ];
- new datum[ 64 ]; new year, month,day;
- getdate( year, month, day );
- new tmphour, tmpminute, tmpsecond;
- gettimeEx( tmphour, tmpminute, tmpsecond );
- FixHour( tmphour );
- tmphour = shifthour;
- format( datum, sizeof( datum ), "%02d/%02d/%d - %d/%d/%d", day, month, year, tmphour, tmpminute, tmpsecond );
- strmid( PlayerInfo[ playerid ][ xLastLogin ], datum, 0, strlen( datum ), 64 );
- SetPlayerScore( playerid, PlayerInfo[ playerid ][ xLevel ] );
- DajIgracuNovac( playerid, ServerInfo[ PocetniNovaca ] );
- SavePlayer( playerid );
- SetPlayerSkin( playerid, PlayerInfo[ playerid ][ xSkin ] );
- TogglePlayerSpectating( playerid, true );
- InterpolateCameraPos(playerid, 374.912872, -1113.013427, 124.437553, 2345.744384, -2112.316162, 98.540664, 50000);
- InterpolateCameraLookAt(playerid, 379.372039, -1115.274536, 124.378959, 2343.739257, -2107.836425, 97.585632, 1);
- SetPlayerInterior( playerid, 0 );
- SetPlayerVirtualWorld( playerid, 1 );
- Dimi_SetPlayerPos( playerid, 473.3107, -1342.6024, 31.8416);
- SendClientMessage(playerid,-1, " ");//dobrodoslica
- SendClientMessage(playerid,-1, " ");
- SendClientMessage(playerid,-1, " ");
- SendClientMessage(playerid,-1, " ");
- SendClientMessage(playerid,-1, " ");
- SendClientMessage(playerid,-1, " ");
- SendClientMessage(playerid,-1, "{0080C0}___________________________| {FFFFFF}Dobro nam dosli {0080C0}|_______________________");
- SendClientMessage(playerid,-1, " ");
- SendClientMessage(playerid,-1, "Dobro nam dosli na TG Gaming");
- SendClientMessage(playerid,-1, "Sada sledi kratak tutorial u kom cemo vam pokazati nekoliko vaznih lokacija");
- SendClientMessage(playerid,-1, "Takodje cemo vas uputiti kako da zapocnete igru na nasem serveru");
- SendClientMessage(playerid,-1, "Da ne duzimo mnogo ostanite sa nama do kraja tutoriala.");
- SendClientMessage(playerid,-1, "{0080C0}__________________________________________________________________");
- TimerTutorial[ playerid ] = SetTimerEx( "PocetniTut", 5000, false, "ii", playerid, 1 );
- PocetniTutorialStartovan[ playerid ] = true;
- return true;
- }
- /*if( playertextid == RegisterTD[ playerid ][ 3 ] ) {
- Kickovanje( playerid, "Prekinuli ste registraciju i kickovani ste!" );
- return true;
- }*/
- //
- if( playertextid == TuningBuy[ playerid ][ 7 ] ) { // desno
- if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
- if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
- if( TPInfo[ playerid ][ tPaintjob ] == false ) {
- new compid = -1, vehicleid = GetPlayerVehicleID( playerid );
- for( new i = ( TPInfo[ playerid ][ tID ]+1 ); i < MAX_COMPONENTS; i++ ) {
- if( cInfo[ i ][ cType ] == TPInfo[ playerid ][ tType ] ) {
- if( cInfo[ i ][ cID ] == IsComponentidCompatible( GetVehicleModel( vehicleid ), cInfo[ i ][ cID ] ) ) {
- compid = i;
- break;
- }
- }
- }
- if( compid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih komponenti izabrane vrste za vas model auta." );
- RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
- TPInfo[ playerid ][ tID ] = compid;
- format( globalstring, sizeof( globalstring ), "%s", cInfo[ compid ][ cName ] );
- PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
- AddVehicleComponent( vehicleid, cInfo[ compid ][ cID ] );
- SelectTextDraw( playerid, TGBOJA );
- }
- else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
- new paintid = -1, vehicleid = GetPlayerVehicleID( playerid );
- for( new i = ( TPInfo[ playerid ][ tID ]+1 ); i < NUMBER_TYPE_PAINTJOB; i++ ) {
- if( pjInfo[ i ][ vehID ] == GetVehicleModel( vehicleid ) ) {
- paintid = i;
- break;
- }
- }
- if( paintid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih boja za vas model auta." );
- TPInfo[ playerid ][ tID ] = paintid;
- format( globalstring, sizeof( globalstring ), "%s", pjInfo[ paintid ][ pNameBre ] );
- PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
- ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
- SelectTextDraw( playerid, TGBOJA );
- }
- return true;
- }
- if( playertextid == TuningBuy[ playerid ][ 8 ] ) { // levo
- if( TPInfo[ playerid ][ tPaintjob ] == false ) {
- if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
- if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
- new compid = -1, vehicleid = GetPlayerVehicleID( playerid );
- for( new i = (TPInfo[ playerid ][ tID ]-1); i > 0; i-- ) {
- if( cInfo[ i ][ cType ] == TPInfo[ playerid ][ tType ] ) {
- if( cInfo[ i ][ cID ] == IsComponentidCompatible( GetVehicleModel( vehicleid ), cInfo[ i ][ cID ] ) ) {
- compid = i;
- break;
- }
- }
- }
- if( compid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih komponenti izabrane vrste za vas model auta." );
- RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
- TPInfo[ playerid ][ tID ] = compid;
- format( globalstring, sizeof( globalstring ), "%s", cInfo[ compid ][ cName ] );
- PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
- AddVehicleComponent( vehicleid, cInfo[ compid ][ cID ] );
- SelectTextDraw( playerid, TGBOJA );
- }
- else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
- new paintid = -1, vehicleid = GetPlayerVehicleID( playerid );
- for( new i = (TPInfo[ playerid ][ tID ]-1); i > 0; i-- ) {
- if( pjInfo[ i ][ vehID ] == GetVehicleModel( vehicleid ) ) {
- paintid = i;
- break;
- }
- }
- if( paintid == -1 ) return GRESKA( playerid, "Nema vise kompatibilnih boja za vas model auta." );
- TPInfo[ playerid ][ tID ] = paintid;
- format( globalstring, sizeof( globalstring ), "%s", pjInfo[ paintid ][ pNameBre ] );
- PlayerTextDrawSetString( playerid, TuningBuy[ playerid ][ 3 ], globalstring );
- ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
- SelectTextDraw( playerid, TGBOJA );
- }
- return true;
- }
- if( playertextid == TuningBuy[ playerid ][ 9 ] ) { // buy
- if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
- if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
- new Float:Pos[ 6 ], vehicleid = GetPlayerVehicleID( playerid );
- if( TPInfo[ playerid ][ tPaintjob ] == false ) {
- new cid = TPInfo[ playerid ][ tID ];
- RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
- VehicleInfo[ vehicleid ][ vTuned ] = true;
- AddVehicleComponent( vehicleid, cInfo[ cid ][ cID ] );
- }
- else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
- new paintid = TPInfo[ playerid ][ tID ];
- VehicleInfo[ vehicleid ][ vTuned ] = true;
- VehicleInfo[ vehicleid ][ vPaintJob ] = pjInfo[ paintid ][ pNumber ];
- ChangeVehicleColor( vehicleid, TPInfo[ playerid ][ PJColor ][ 0 ], TPInfo[ playerid ][ PJColor ][ 1 ] );
- ChangeVehiclePaintjob( vehicleid, pjInfo[ paintid ][ pNumber ] );
- }
- GetVehicleCameraPos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 6, 2 );
- SetPlayerCameraPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
- GetVehiclePos( vehicleid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
- SetPlayerCameraLookAt( playerid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
- CancelSelectTextDraw( playerid );
- TuningTDShow( playerid, false );
- TogglePlayerControllable( playerid, true );
- SPD( playerid, dialog_TUNING, DSL, D_NASLOV, "Paintjobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nWheels\nCar Stereo\nHydraulics\nNitro", D_ODABERI, D_ODUSTANI );
- return true;
- }
- if( playertextid == TuningBuy[ playerid ][ 13 ] ) { // close
- if( !IsPlayerInAnyVehicle( playerid ) ) return GRESKA( playerid, "Morate biti u vozilu." );
- if( GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return GRESKA( playerid, "Morate biti na mjestu vozaca." );
- new Float:Pos[ 6 ], vehicleid = GetPlayerVehicleID( playerid );
- if( TPInfo[ playerid ][ tPaintjob ] == false ) {
- RemoveVehicleComponent( vehicleid, cInfo[ TPInfo[ playerid ][ tID ] ][ cID ] );
- }
- else if( TPInfo[ playerid ][ tPaintjob ] == true ) {
- ChangeVehiclePaintjob( vehicleid, 3 );
- ChangeVehicleColor( vehicleid, TPInfo[ playerid ][ PJColor ][ 0 ], TPInfo[ playerid ][ PJColor ][ 1 ] );
- }
- GetVehicleCameraPos( vehicleid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ], 0, 6, 2 );
- SetPlayerCameraPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
- GetVehiclePos( vehicleid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
- SetPlayerCameraLookAt( playerid, Pos[ 0 ],Pos[ 1 ],Pos[ 2 ] );
- CancelSelectTextDraw( playerid );
- TuningTDShow( playerid, false );
- TogglePlayerControllable( playerid, true );
- SPD( playerid, dialog_TUNING, DSL, D_NASLOV, "Paintjobs\nColors\nExhausts\nFront Bumper\nRear Bumper\nRoof\nSpoilers\nSide Skirts\nWheels\nCar Stereo\nHydraulics\nNitro", D_ODABERI, D_ODUSTANI );
- return true;
- }
- //
- if( playertextid == atmTD[ playerid ][ 1 ] ) { // presecanje zica
- new atmid = GetNearestAtm( playerid );
- if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
- if( atmInfo[ atmid ][ atmPreseceneZice ] == true ) return GRESKA( playerid, "Vec su presecene zice." );
- if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
- if( GetWeapon( playerid ) != 4 ) return GRESKA( playerid, "Morate da imate noz u rukama" );
- atmrobTimer[ playerid ] = SetTimerEx( "RobZiceAtm", 1000, true, "d", playerid );
- robbingATM[ playerid ] = atmid;
- robbingATMSeconds[ playerid ] = 95;
- CancelSelectTextDraw( playerid );
- SendInfoMessage( playerid, "Poceli ste sa obijanjem bankomata, ne pomerajte se sa svog mesta." );
- return true;
- }
- if( playertextid == atmTD[ playerid ][ 2 ] ) { // ulazak u bios
- new atmid = GetNearestAtm( playerid );
- if( !LaptopRuke[ playerid ] ) return GRESKA( playerid, "Nemate laptop u rukama." );
- if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
- if( atmInfo[ atmid ][ atmProbijenBios ] == true ) return GRESKA( playerid, "Vec je hakovan ovaj bankomat." );
- if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
- robbingATM[ playerid ] = atmid;
- atmLoadingTDControl( playerid, true );
- PlayerTextDrawSetString( playerid, atmrobLoading[ playerid ][ 1 ], "0%" );
- //atmrobTimer[ playerid ] = SetTimerEx( "ProgresAtmBar", 1000, false, "d", playerid );
- CancelSelectTextDraw( playerid );
- return true;
- }
- if( playertextid == atmTD[ playerid ][ 3 ] ) { // kradja novca
- new atmid = GetNearestAtm( playerid );
- if( atmid == -1 ) return GRESKA( playerid, "Nisi pored bankomata." );
- if( atmInfo[ atmid ][ atmVremeDoRoba ] != 0 ) return GRESKA( playerid, "Ovaj bankomat je vec opljackan." );
- if( atmInfo[ atmid ][ atmPreseceneZice ] == true ) {
- new pokusaj = random(4);
- if( pokusaj == 1 ) {
- Dimi_KillTimer( atmrobTimer[ playerid ] );
- SendInfoMessage( playerid, "Niste uspeli ukrasti novac, alarm se oglasio." );
- PostaviWanted( playerid, "Pokusaj pljacke bankomata", "Nepoznati", 3 );
- atmInfo[ atmid ][ atmVremeDoRoba ] = 60;
- SacuvajATM( atmid );
- PlayerInfo[ playerid ][ xPljackaVreme ] = 60;
- atmTDControl( playerid, false );
- }
- else {
- Dimi_KillTimer( atmrobTimer[ playerid ] );
- new money = ( random(5000)+10000 );
- DajIgracuNovac( playerid, money );
- SavePlayer( playerid ); UpdateBankTD( playerid );
- SendInfoMessage( playerid, "Uspjesno ste ukrali iz bankomata %d$.", money );
- PostaviWanted( playerid, "Pljacka bankomata", "Nepoznati", 3 );
- atmInfo[ atmid ][ atmVremeDoRoba ] = 120;
- SacuvajATM( atmid );
- PlayerInfo[ playerid ][ xPljackaVreme ] = 120;
- atmTDControl( playerid, false );
- }
- }
- else if( atmInfo[ atmid ][ atmProbijenBios ] == true ) {
- new pokusaj = random(4);
- if( pokusaj == 1 ) {
- Dimi_KillTimer( atmrobTimer[ playerid ] );
- SendInfoMessage( playerid, "Niste uspeli prebaciti novac na vas racun, sistem zastite bankomata je ponovno podignut." );
- PostaviWanted( playerid, "Pokusaj pljacke bankomata", "Nepoznati", 3 );
- atmInfo[ atmid ][ atmVremeDoRoba ] = 60;
- SacuvajATM( atmid );
- PlayerInfo[ playerid ][ xPljackaVreme ] = 60;
- atmTDControl( playerid, false );
- }
- else {
- Dimi_KillTimer( atmrobTimer[ playerid ] );
- new money = ( random(5000)+10000 );
- PlayerInfo[ playerid ][ xBRacun ] += money;
- SavePlayer( playerid ); UpdateBankTD( playerid );
- SendInfoMessage( playerid, "Uspjesno ste sa bankomata prebacili %d$ na vas racun.", money );
- PostaviWanted( playerid, "Pljacka bankomata", "Nepoznati", 3 );
- atmInfo[ atmid ][ atmVremeDoRoba ] = 120;
- SacuvajATM( atmid );
- PlayerInfo[ playerid ][ xPljackaVreme ] = 120;
- atmTDControl( playerid, false );
- }
- }
- else return GRESKA( playerid, "Moras prvo da hakujes bankomat ili da mu preseces zice." );
- return true;
- }
- //
- if( playertextid == buyWatch[ playerid ][ 3 ] ) {
- new text[ 30 ];
- if( WatchModel[ playerid ] == 19039 ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 521 ) return GRESKA( playerid, "Nemate dovoljno novca." );
- DajIgracuNovac( playerid, -521 );
- text = "Rolex Datejust za 521$";
- PlayerInfo[ playerid ][ xSat ] = 19039;
- }
- else if( WatchModel[ playerid ] == 19040 ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 618 ) return GRESKA( playerid, "Nemate dovoljno novca." );
- DajIgracuNovac( playerid, -618 );
- text = "Emporio Armani za 618$";
- PlayerInfo[ playerid ][ xSat ] = 19040;
- }
- else if( WatchModel[ playerid ] == 19041 ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 723 ) return GRESKA( playerid, "Nemate dovoljno novca." );
- DajIgracuNovac( playerid, -723 );
- text = "Casio G-Shock za 723$";
- PlayerInfo[ playerid ][ xSat ] = 19041;
- }
- else if( WatchModel[ playerid ] == 19042 ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 819 ) return GRESKA( playerid, "Nemate dovoljno novca." );
- DajIgracuNovac( playerid, -819 );
- text = "Michael Kors za 819$";
- PlayerInfo[ playerid ][ xSat ] = 19042;
- }
- else if( WatchModel[ playerid ] == 19043 ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 916 ) return GRESKA( playerid, "Nemate dovoljno novca." );
- DajIgracuNovac( playerid, -916 );
- text = "Hugo Boss za 916$";
- PlayerInfo[ playerid ][ xSat ] = 19043;
- }
- SendInfoMessage( playerid, "Uspjesno si kupio sat marke %s.( koristi komandu /sat ).", text );
- SavePlayer( playerid );
- buyWatchTDControl( playerid, false );
- return true;
- }
- if( playertextid == buyWatch[ playerid ][ 7 ] ) {
- SendInfoMessage( playerid, "Odustali ste od kupovine sata." );
- buyWatchTDControl( playerid, false );
- return true;
- }
- if( playertextid == buyWatch[ playerid ][ 4 ] ) {
- new text[ 30 ];
- if( WatchModel[ playerid ] == 19043 ) return 1;
- WatchModel[ playerid ]++;
- PlayerTextDrawSetPreviewModel( playerid, buyWatch[ playerid ][ 1 ], WatchModel[ playerid ] );
- PlayerTextDrawShow( playerid, buyWatch[ playerid ][ 1 ] );
- if( WatchModel[ playerid ] == 19039 ) text = "Rolex Datejust - 521$";
- else if( WatchModel[ playerid ] == 19040 ) text = "Emporio Armani - 618$";
- else if( WatchModel[ playerid ] == 19041 ) text = "Casio G-Shock - 723$";
- else if( WatchModel[ playerid ] == 19042 ) text = "Michael Kors - 819$";
- else if( WatchModel[ playerid ] == 19043 ) text = "Hugo Boss - 916$";
- PlayerTextDrawSetString( playerid, buyWatch[ playerid ][ 2 ], text );
- return true;
- }
- if( playertextid == buyWatch[ playerid ][ 5 ] ) {
- new text[ 30 ];
- if( WatchModel[ playerid ] == 19039 ) return 1;
- WatchModel[ playerid ]--;
- PlayerTextDrawSetPreviewModel( playerid, buyWatch[ playerid ][ 1 ], WatchModel[ playerid ] );
- PlayerTextDrawShow( playerid, buyWatch[ playerid ][ 1 ] );
- if( WatchModel[ playerid ] == 19039 ) text = "Rolex Datejust - 521$";
- else if( WatchModel[ playerid ] == 19040 ) text = "Emporio Armani - 618$";
- else if( WatchModel[ playerid ] == 19041 ) text = "Casio G-Shock - 723$";
- else if( WatchModel[ playerid ] == 19042 ) text = "Michael Kors - 819$";
- else if( WatchModel[ playerid ] == 19043 ) text = "Hugo Boss - 916$";
- PlayerTextDrawSetString( playerid, buyWatch[ playerid ][ 2 ], text );
- return true;
- }
- //
- if( playertextid == Ormar[ playerid ][ 8 ] ) {
- if( II[ inProperty[ playerid ] ][ iSkin ][ 0 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 0 ] = 0; }
- if( II[ inProperty[ playerid ] ][ iSkin ][ 1 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 1 ] = 0; }
- if( II[ inProperty[ playerid ] ][ iSkin ][ 2 ] == GetPlayerSkin( playerid ) ) { II[ inProperty[ playerid ] ][ iSkin ][ 2 ] = 0; }
- SaveProperty( inProperty[ playerid ] );
- PlayerInfo[ playerid ][ xSkin ] = GetPlayerSkin( playerid );
- SCM( playerid, TGBOJA, "Obukli ste drugu odecu. " );
- Dimi_SetPlayerPos( playerid, II[ inProperty[ playerid ] ][ iExit ][ 0 ], II[ inProperty[ playerid ] ][ iExit ][ 1 ], II[ inProperty[ playerid ] ][ iExit ][ 2 ] );
- SetPlayerInterior( playerid, II[ inProperty[ playerid ] ][ iInterior ] );
- SetPlayerVirtualWorld( playerid, II[ inProperty[ playerid ] ][ iVW ] );
- ClearAnimations( playerid );
- GameTextForPlayer( playerid, "Ucitavanje ...", 1000, 4 );
- SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
- SetCameraBehindPlayer( playerid );
- TogglePlayerControllable( playerid, false );
- CancelSelectTextDraw( playerid );
- OrmarTDControl( playerid, false );
- TogglePlayerControllable( playerid, true );
- return true;
- }
- if( playertextid == Ormar[ playerid ][ 3 ] ) {
- if( II[ inProperty[ playerid ] ][ iSkin ][ 0 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
- SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 0 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
- return true;
- }
- if( playertextid == Ormar[ playerid ][ 4 ] ) {
- if( II[ inProperty[ playerid ] ][ iSkin ][ 1 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
- SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 1 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
- return true;
- }
- if( playertextid == Ormar[ playerid ][ 5 ] ) {
- if( II[ inProperty[ playerid ] ][ iSkin ][ 2 ] == 0 ) return GRESKA( playerid, " U ovom slotu nemate odecu." );
- SetPlayerSkin( playerid, II[ inProperty[ playerid ] ][ iSkin ][ 2 ] ); ApplyAnimation( playerid, "CLOTHES","CLO_Pose_Legs",4.1,1,0,0,0,0, 1);
- return true;
- }
- if( playertextid == Ormar[ playerid ][ 9 ] ) {
- Dimi_SetPlayerPos( playerid, II[ inProperty[ playerid ] ][ iExit ][ 0 ], II[ inProperty[ playerid ] ][ iExit ][ 1 ], II[ inProperty[ playerid ] ][ iExit ][ 2 ] );
- SetPlayerInterior( playerid, II[ inProperty[ playerid ] ][ iInterior ] );
- SetPlayerVirtualWorld( playerid, II[ inProperty[ playerid ] ][ iVW ] );
- SCM( playerid, TGBOJA, "Odustali ste od oblacenja nove odece. " );
- SetPlayerSkin( playerid, PlayerInfo[ playerid ][ xSkin ] );
- ClearAnimations( playerid );
- GameTextForPlayer( playerid, "Ucitavanje ...", 1000, 4 );
- SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
- SetCameraBehindPlayer( playerid );
- TogglePlayerControllable( playerid, false );
- CancelSelectTextDraw( playerid );
- OrmarTDControl( playerid, false );
- TogglePlayerControllable( playerid, true );
- return true;
- }
- if( playertextid == ObjektTD[ playerid ][ 4 ] ) {
- if( ListaoObjekte[ playerid ] == 0 ) return 1;
- ListaoObjekte[ playerid ]--;
- new i = ListaoObjekte[ playerid ];
- DestroyObject( glavniobjekt );
- glavniobjekt = CreateObject( OBPR[ i ][ 0 ], OBPR1[ i ][ 0 ], OBPR1[ i ][ 1 ], OBPR1[ i ][ 2 ], OBPR1[ i ][ 3 ], OBPR1[ i ][4], OBPR1[ i ][5] );
- format( globalstring, sizeof( globalstring ), "cena: ~w~%d$", OBPR[ i ][ 1 ] );
- PlayerTextDrawSetString( playerid, ObjektTD[ playerid ][ 1 ], globalstring );
- return true;
- }
- if( playertextid == ObjektTD[ playerid ][ 2 ] ) {
- if( ListaoObjekte[ playerid ] == (MAX_OBJ_FURNITURE-1) ) return 1;
- ListaoObjekte[ playerid ]++;
- new i = ListaoObjekte[ playerid ];
- DestroyObject( glavniobjekt );
- glavniobjekt = CreateObject( OBPR[ i ][ 0 ], OBPR1[ i ][ 0 ], OBPR1[ i ][ 1 ], OBPR1[ i ][ 2 ], OBPR1[ i ][ 3 ], OBPR1[ i ][4], OBPR1[ i ][5] );
- format( globalstring, sizeof( globalstring ), "cena: ~w~%d$", OBPR[ i ][ 1 ] );
- PlayerTextDrawSetString( playerid, ObjektTD[ playerid ][ 1 ], globalstring );
- return true;
- }
- if( playertextid == ObjektTD[ playerid ][ 5 ] ) {
- new i = ListaoObjekte[ playerid ];
- if( ServerInfo[ Namestaj ] == 0 ) return GRESKA( playerid, "Nema vise namestaja u resursima za namestaje." );
- if( PlayerInfo[ playerid ][ xNovac ] < OBPR[ i ][ 1 ] ) return GRESKA( playerid, " Nemate dovoljno novca." );
- if( PlayerInfo[ playerid ][ xObject ][ 0 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 0 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 1 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 1 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 2 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 2 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 3 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 3 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 4 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 4 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 5 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 5 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 6 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 6 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 7 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 7 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 8 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 8 ] = OBPR[ i ][ 0 ]; }
- else if( PlayerInfo[ playerid ][ xObject ][ 9 ] == -1 ) { PlayerInfo[ playerid ][ xObject ][ 9 ] = OBPR[ i ][ 0 ]; }
- else { GRESKA( playerid, "Vec ste kupili 10 objekta, nema mesta vise u kamionu." ); return 1; }
- DajIgracuNovac( playerid, -OBPR[ i ][ 1 ] );
- SCM( playerid, TGBOJA, "Uspjesno ste kupili namestaj!" );
- SCM( playerid, TGBOJA, "Na mjestu gdje zelite postaviti namestaj, upisite /namestaj postavi" );
- SCM( playerid, TGBOJA, "Mozete kupiti 10 namestaja odjednom." );
- ServerInfo[ Namestaj ] -= 1;
- SaveServerStats( );
- return true;
- }
- if( playertextid == ObjektTD[ playerid ][ 3 ] ) {
- nekokupujenamestaj = 0;
- KupujeNamestaj[ playerid ] = 0;
- ListaoObjekte[ playerid ] = 0;
- TogglePlayerControllable( playerid, true );
- SetCameraBehindPlayer( playerid );
- CancelSelectTextDraw( playerid );
- ObjektTDControl( playerid, false );
- return true;
- }
- if( playertextid == Police_TV[ playerid ][ 3 ] )
- {
- SPD( playerid, dialog_SEARCH_NAME, DSI, D_NASLOV, "Upisite Ime i prezime gradjanina(Ime_Prezime) kojega zelite potraziti u bazi podataka:", D_ODABERI, D_ODUSTANI );
- return true;
- }
- if( playertextid == Police_TV[ playerid ][ 6 ] )
- {
- SPD( playerid, dialog_SEARCH_NUMBERPLATE, DSI, D_NASLOV, "Unesite broj tablice u prazno polje.(bez nula-00 i bez LS( samo broj ) )", D_ODABERI, D_ODUSTANI );
- return true;
- }
- if( playertextid == Police_TV[ playerid ][ 13 ] )
- {
- Police_TVTDControl( playerid, false );
- CancelSelectTextDraw( playerid );
- SetPVarInt( playerid, "Computer", 0 );
- return true;
- }
- if( playertextid == Police_TV[ playerid ][ 12 ] )
- {
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ) );
- strcat( DialogStrgEx, "|_______-=Popis svih osumnjicenih=-________|\n" );
- foreach( Player, i )
- {
- if( IsPlayerConnected( i ) )
- {
- if( PlayerInfo[ i ][ xWanted ] > 0 )
- {
- format( globalstring, sizeof( globalstring ), "- %s | Wanted Level: %d\n", ImeIgraca( i ), PlayerInfo[ i ][ xWanted ] );
- strcat( DialogStrgEx, globalstring );
- }
- }
- }
- ShowPlayerDialog( playerid, 0, DSMSG, D_NASLOV, DialogStrgEx, "U redu", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
- return true;
- }
- if( playertextid == Police_TV[ playerid ][ 8 ] )
- {
- if(GetPVarInt( playerid, "RequestingBackup") != 1)
- {
- format( globalstring, sizeof( globalstring ), "SVE JEDINICE: %s trazi pojacanje i oznacen je na GPSu (crveno).", ImeIgraca( playerid ) );
- SetPVarInt( playerid, "RequestingBackup", 1);
- foreach( Player, i )
- {
- if( IsPlayerConnected(i))
- {
- if( OI[ PlayerInfo[ i ][ xClan ] ][ oTip ] == ORG_TIP_PD )
- {
- SetPlayerMarkerForPlayer( i, playerid, 0xFF0000FF );
- SCM( i, 0x8D8DFF00, globalstring );
- }
- }
- }
- SCM( playerid, 0x8D8DFF00, "Ukucajte /bkc da bi ste izbrisali pojacanje." );
- backuptimer[ playerid ] = SetTimerEx( "BackupClear", 180000, false, "ii", playerid, 1 );
- } else GRESKA( playerid, "Vec imate aktivan zahjtev za pojacanje!");
- return true;
- }
- if( playertextid == Police_TV[ playerid ][ 10 ] )
- {
- SPD( playerid, dialog_POSTAVIPOTERU, DSI, D_NASLOV, "Upisite Ime i prezime gradjanina(Ime_Prezime) i razlog za potjeru.", D_ODABERI, D_ODUSTANI );
- return true;
- }
- //
- if( playertextid == PizzaMenu[ playerid ][ 7 ] ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 67 ) return GRESKA( playerid, "Nemate dovoljno novca 67$!");
- BussinesMoney( uFirmi[ playerid ] , 67 );
- DajIgracuNovac( playerid, -67 );
- DodajIgracuHP( playerid, 30 );
- format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
- PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
- OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- PizzaMenuTDControl( playerid, false );
- return true;
- }
- if( playertextid == PizzaMenu[ playerid ][ 10 ] ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 79) return GRESKA( playerid, "Nemate dovoljno novca 79$!");
- BussinesMoney( uFirmi[ playerid ] , 79);
- DajIgracuNovac( playerid, -79 );
- DodajIgracuHP( playerid, 30 );
- format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
- PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
- OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- PizzaMenuTDControl( playerid, false );
- return true;
- }
- if( playertextid == PizzaMenu[ playerid ][ 13 ] ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 81) return GRESKA( playerid, "Nemate dovoljno novca 81$!");
- BussinesMoney( uFirmi[ playerid ] , 81);
- DajIgracuNovac( playerid, -81 );
- DodajIgracuHP( playerid, 30 );
- format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
- PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
- OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- PizzaMenuTDControl( playerid, false );
- return true;
- }
- if( playertextid == PizzaMenu[ playerid ][ 16 ] ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 89) return GRESKA( playerid, "Nemate dovoljno novca 89$!");
- BussinesMoney( uFirmi[ playerid ] , 89);
- DajIgracuNovac( playerid, -89 );
- DodajIgracuHP( playerid, 30 );
- format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
- PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
- OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- PizzaMenuTDControl( playerid, false );
- return true;
- }
- if( playertextid == PizzaMenu[ playerid ][ 19 ] ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 98) return GRESKA( playerid, "Nemate dovoljno novca 98$!");
- BussinesMoney( uFirmi[ playerid ] , 98);
- DajIgracuNovac( playerid, -98 );
- DodajIgracuHP( playerid, 30 );
- format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
- PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
- OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- PizzaMenuTDControl( playerid, false );
- return true;
- }
- if( playertextid == PizzaMenu[ playerid ][ 22 ] ) {
- if( PlayerInfo[ playerid ][ xNovac ] < 108) return GRESKA( playerid, "Nemate dovoljno novca 108$!");
- BussinesMoney( uFirmi[ playerid ] , 108);
- DajIgracuNovac( playerid, -108 );
- DodajIgracuHP( playerid, 30 );
- format( globalstring, sizeof( globalstring ), "* %s uzima kupljene stvari od prodavacice i jede.", ImeIgraca( playerid ) );
- PorukaRadius( 15.0, playerid, globalstring, LJUBICASTA );
- OnePlayAnim( playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- PizzaMenuTDControl( playerid, false );
- return true;
- }
- //--------------------stats---------------------------------------------
- //
- if( playertextid == ZaposljavanjeTD[ playerid ][ 7 ] ) {
- if( PlayerInfo[ playerid ][ xPosao ] != 0 ) {
- GRESKA( playerid, "Vec imate posao!Koristite /otkaz da date otkaz!");
- ZaposljavanjeTDControl( playerid, false, "", "", "" );
- CancelSelectTextDraw( playerid );
- return true;
- }
- if( GetPlayerState( playerid ) != 1 ) {
- GRESKA( playerid, "Ne smete biti u vozilu!");
- ZaposljavanjeTDControl( playerid, false, "", "", "" );
- CancelSelectTextDraw( playerid );
- return true;
- }
- if( ChosenJob[ playerid ] == POSAO_MEHANICAR ) {
- if( PlayerInfo[ playerid ][ xSrednja ] != 6 ) return GRESKA( playerid, "Moras da zavrsis prvo srednju skolu. " );
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Mehanicar",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Mehanicar!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /mechanic /tow", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_MASINOVODJA ) {
- //if( PlayerInfo[ playerid ][ xFakultet ] != 15 ) return GRESKA( playerid, "Moras prvo da zavrsis fakultet. " );
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Masinovodja",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Masinovodja!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_PREVOZNIK ) {
- if( PlayerInfo[ playerid ][ xKamionskaC1 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kombije. ");
- if( PlayerInfo[ playerid ][ xKamionskaC2 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kamione. ");
- if( PlayerInfo[ playerid ][ xKamionskaC3 ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za kamione sa prikolicom. ");
- if( PlayerInfo[ playerid ][ xVozacka ] == 0 ) return GRESKA( playerid, "Ne posedujes vozacku dozvolu. ");
- if( PlayerInfo[ playerid ][ xSrednja ] != 6 ) return GRESKA( playerid, "Moras da zavrsis prvo srednju skolu. " );
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Prevoznik",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Prevoznik!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /prevozdrveca /prevozsljunka /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_KOSAC ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Kosac trave",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Kosac trave!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_KOMUNALAC ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Komunalac",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Komunalac!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_GRADJEVINAR ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Gradjevinar",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Gradjevinar!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white"/prekiniposao /uniforma", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_PIZZA ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Dostavljac pica",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Dostavljac pica!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /pizza", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_PILOT ) {
- if( PlayerInfo[ playerid ][ xLetelica ] == 0 ) return GRESKA( playerid, "Ne posedujes dozvolu za avion/helic." );
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Pilot",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Pilot!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_FARMER ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Farmer",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Farmer!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /uzmisemenke /uzmikantu /muzikrave /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_BUSVOZAC ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Bus vozac",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Bus vozac!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_RUDAR ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Rudar",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Rudar!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sati ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_PREVOZNOVCA ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Prevoznik Novca",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Prevoznik Novca!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /prekiniposao", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_RIBAR ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Posao Ribar",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Ribar!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /pecaj /uniforma /zavrsipecanje", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_PNAMESTAJA ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Proizvodjac Namestaja",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Proizvodjac Namestaja!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /posao /uniforma /ostavidrvo /uzmidrvo", "U redu", "");
- }
- else if( ChosenJob[ playerid ] == POSAO_MERKATORDOSTAVA ) {
- ShowPlayerDialog( playerid, 0, DSMSG, "Merkator Dostavljac",
- ""col_job"Cestitamo! Uspjesno ste se zaposlili kao Merkator Dostavljac!\n\n" \
- ""col_job"Potrebno je da odradite barem 3 sata ugovora kako bi ste dali otkaz!\n" \
- ""col_job"Komande posla: "col_white" /uzmiktuiju /uniforma", "U redu", "");
- }
- PlayerInfo[ playerid ][ xPosao ] = ChosenJob[ playerid ];
- PlayerInfo[ playerid ][ xUgovor ] = 0;
- SavePlayer( playerid );
- ZaposljavanjeTDControl( playerid, false, "", "", "" );
- CancelSelectTextDraw( playerid );
- return true;
- }
- if( playertextid == ZaposljavanjeTD[ playerid ][ 8 ] ) {
- SendInfoMessage( playerid, "Odustali ste od zaposljavanja." );
- ZaposljavanjeTDControl( playerid, false, "", "", "" );
- CancelSelectTextDraw( playerid );
- return true;
- }
- // sasasa
- if(Start[ playerid ] != PlayerText:INVALID_TEXT_DRAW) {
- if(DEALSTEXT == playertextid)
- {
- if(PP_Info[ playerid ][click_dealbutton] == WAIT_CLICKDEALTEXT) return 1;
- if(PP_Info[ playerid ][click_dealbutton] == FIRST_CLICKDEALTEXT)
- {
- if(PP_Info[ playerid ][Credit] < 1) return GRESKA(playerid, "Nemas na racunu. Klikni na {FFFFFF}ADD COIN");
- if(PP_Info[ playerid ][Credit] < PP_Info[ playerid ][PokerBet])
- {
- PP_Info[ playerid ][PokerBet] = PP_Info[ playerid ][Credit];
- }
- PP_Info[ playerid ][Credit] -= PP_Info[ playerid ][PokerBet];
- PP_Info[ playerid ][click_dealbutton] = WAIT_CLICKDEALTEXT;
- PlayerTextDrawHide(playerid, ADDCOINSTEXT);
- PlayerTextDrawHide(playerid, BETTEXT);
- PlayerPlaySound(playerid, 43000, 0.00, 0.00, 0.00);
- RandomCard(PP_Info[ playerid ][fivecards_hand], 10);
- WinnText(playerid);
- BetCredit(playerid);
- TextDrawDizajn(playerid, 0);
- } else {
- PP_Info[ playerid ][click_dealbutton] = FIRST_CLICKDEALTEXT;
- PlayerTextDrawShow(playerid, ADDCOINSTEXT);
- PlayerTextDrawShow(playerid, BETTEXT);
- for(new i; i < 5; i++)
- {
- if(PP_Info[ playerid ][holdstate][i] == HOLDON)
- {
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, " ");
- PP_Info[ playerid ][holdstate][i] = HOLDOFF;
- } else {
- Swap(PP_Info[ playerid ][fivecards_hand][i], PP_Info[ playerid ][fivecards_hand][i + 5]);
- PlayerTextDrawSetString(playerid, CARDSTEXT + PlayerText:i, LD_POKE[PP_Info[ playerid ][fivecards_hand][i]]);
- }
- }
- new
- first,
- second,
- rank = get_rank(PP_Info[ playerid ][fivecards_hand]),
- win = get_win(rank);
- rankname(rank, first, second);
- if(win > ONE_PAIR)
- {
- PP_Info[ playerid ][Credit] += (pot[win] * PP_Info[ playerid ][PokerBet]);
- switch(win)
- {
- case STRAIGHT, FLUSH, STRAIGHT_FLUSH, FULL_HOUSE, ROYAL_FLUSH:
- {
- for(new i = 0; i < 5; i++)
- {
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
- }
- }
- case TWO_PAIR:
- {
- for(new i = 0; i < 5; i++)
- {
- if(first == Card_Value[PP_Info[ playerid ][fivecards_hand][i]] ||
- second == Card_Value[PP_Info[ playerid ][fivecards_hand][i]])
- {
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
- }
- }
- }
- case THREE_OF_A_KIND, FOUR_OF_A_KIND:
- {
- for(new i = 0; i < 5; i++)
- {
- if(first == Card_Value[PP_Info[ playerid ][fivecards_hand][i]])
- {
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
- }
- }
- }
- }
- PlayerPlaySound(playerid, 5448, 0.00, 0.00, 0.00);
- WinnText(playerid, win, rank);
- BetCredit(playerid);
- } else {
- for(new i = 0; i < 5; i++)
- {
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
- }
- }
- }
- } else {
- if(PP_Info[ playerid ][click_dealbutton] == SECOND_CLICKDEALTEXT)
- {
- for(new i = 0; i < 5; i++)
- {
- if(CARDSTEXT + PlayerText:i == playertextid)
- {
- PP_Info[ playerid ][holdstate][i] = HOLDOFF - PP_Info[ playerid ][holdstate][i];
- if(PP_Info[ playerid ][holdstate][i])
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
- else
- PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
- PlayerPlaySound(playerid, 21000, 0.00, 0.00, 0.00);
- return 1;
- }
- }
- }
- else if(ADDCOINSTEXT == playertextid)
- {
- if( PlayerInfo[ playerid ][ xNovac ] < 100)
- {
- GRESKA( playerid, "Nemas novca.");
- } else {
- DajIgracuNovac( playerid, -100 );
- PP_Info[ playerid ][ Credit ] += 100;
- BetCredit(playerid);
- PlayerPlaySound(playerid, 4203, 0.00, 0.00, 0.00);
- }
- return 1;
- }
- else if(BETTEXT == playertextid)
- {
- if(PP_Info[ playerid ][PokerBet] < 100)
- PP_Info[ playerid ][PokerBet]++;
- else
- PP_Info[ playerid ][PokerBet] = 5;
- BetCredit(playerid);
- WinnText(playerid);
- PlayerPlaySound(playerid, 4202, 0.00, 0.00, 0.00);
- return 1;
- }
- }
- if(CHANGEBACKGROUND == playertextid)
- {
- PP_Info[ playerid ][LastBackGround]++;
- if(PP_Info[ playerid ][LastBackGround] == sizeof BackGroundData)
- PP_Info[ playerid ][LastBackGround] = 0;
- PlayerTextDrawSetString(playerid, BACKGROUND, BackGroundData[PP_Info[ playerid ][LastBackGround]]);
- return 1;
- }
- if(EXITPOKER == playertextid)
- {
- ExitPoker(playerid);
- return 1;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement