[POMOC] Menjanje dialoga u drugo

Započeo kim3205, Oktobar 23, 2016, 03:30:50 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:Athlone by Mumka
Detaljan opis problema:Imate slike da vidite kako trenutno  izgleda sistem u vezi vozila,a hteo bih da napravim sve iz dialoga bude u komandama nprimer /v list,/v park,/v find1,2,3,4 ,/v sellto [Igracu pradat] ,/v sell[drzavi prodat],/v color  znaci ono potpuno prosto da bude preko CMD.
Dio skripte:
[pawn]CMD:vozilo( playerid, params[] ) {
    new string[ 128 ];
   format( string, sizeof( string ),"%s\n%s\n%s\n%s", getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] ), getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] ), getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] ), getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] ) );
   SPD( playerid, dialog_VEHLIST, DIALOG_STYLE_LIST, D_NASLOV, string, "Odaberi", "Izlaz" );
   return true;
}[/pawn]
[pawn]   else if( dialogid == dialog_VEHLIST ) {
       if( !response ) return 1;
      if( response ) {
         switch( listitem ) {
            case 0: {
                if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == -1 ) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
                if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == 0 ) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
                new vFile[ 50 ];
                 format( vFile, sizeof( vFile ), V_FILE, PlayerInfo[ playerid ][ xVoziloID ][ 0 ] );
                 if( fexist( vFile ) ) {
                  if( strcmp( ImeIgraca( playerid ), VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 0 ] ][ vOwner ], true ) == 0 ) {
                     ChosenVehicle[ playerid ] = PlayerInfo[ playerid ][ xVoziloID ][ 0 ];
                           SPD( playerid, dialog_VEHCHOSEN, DSL, "Vozilo", "Informacije\nParkiraj\nLociraj\nUgradi GPS\nProdaj igracu\nProdaj otpadu\nMakni tuning\nNeon\nGepek\nPromeni boju", "Odaberi", "Nazad" );
                       }
                       else {
                     SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Ovo vozilo nije u vasem vlasnistvu, obratite se na forumu ako mislite je greska." );
                  }
               }
               else {
                   SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Vase vozilo ne postoji u bazi podataka, obratite se na forumu ako mislite je greska." );
               }
            }
            case 1: {
                if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == -1) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
                if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == 0 ) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
                    new vFile[ 50 ];
                 format( vFile, sizeof( vFile ), V_FILE, PlayerInfo[ playerid ][ xVoziloID ][ 1 ] );
                 if( fexist( vFile ) ) {
                  if( strcmp( ImeIgraca( playerid ), VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 1 ] ][ vOwner ], true ) == 0 ) {
                     ChosenVehicle[ playerid ] = PlayerInfo[ playerid ][ xVoziloID ][ 1 ];
                           SPD( playerid, dialog_VEHCHOSEN, DSL, "Vozilo", "Informacije\nParkiraj\nLociraj\nUgradi GPS\nProdaj igracu\nProdaj otpadu\nMakni tuning\nNeon\nGepek\nPromeni boju", "Odaberi", "Nazad" );
                       }
                       else {
                     SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Ovo vozilo nije u vasem vlasnistvu, obratite se na forumu ako mislite je greska." );
                  }
               }
               else {
                   SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Vase vozilo ne postoji u bazi podataka, obratite se na forumu ako mislite je greska." );
               }
            }
            case 2: {
                if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == -1) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
                    if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == 0 ) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
               new vFile[ 50 ];
                 format( vFile, sizeof( vFile ), V_FILE, PlayerInfo[ playerid ][ xVoziloID ][ 2 ] );
                 if( fexist( vFile ) ) {
                  if( strcmp( ImeIgraca( playerid ), VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 2 ] ][ vOwner ], true ) == 0 ) {
                     ChosenVehicle[ playerid ] = PlayerInfo[ playerid ][ xVoziloID ][ 2 ];
                           SPD( playerid, dialog_VEHCHOSEN, DSL, "Vozilo", "Informacije\nParkiraj\nLociraj\nUgradi GPS\nProdaj igracu\nProdaj otpadu\nMakni tuning\nNeon\nGepek\nPromeni boju", "Odaberi", "Nazad" );
                       }
                       else {
                     SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Ovo vozilo nije u vasem vlasnistvu, obratite se na forumu ako mislite je greska." );
                  }
               }
               else {
                   SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Vase vozilo ne postoji u bazi podataka, obratite se na forumu ako mislite je greska." );
               }
            }
            case 3: {
                if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == -1) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
                    if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == 0 ) return GRESKA( playerid, "Ti ne posedujes vozilo u ovom slotu.");
               new vFile[ 50 ];
                 format( vFile, sizeof( vFile ), V_FILE, PlayerInfo[ playerid ][ xVoziloID ][ 3 ] );
                 if( fexist( vFile ) ) {
                  if( strcmp( ImeIgraca( playerid ), VehicleInfo[ PlayerInfo[ playerid ][ xVoziloID ][ 3 ] ][ vOwner ], true ) == 0 ) {
                     ChosenVehicle[ playerid ] = PlayerInfo[ playerid ][ xVoziloID ][ 3 ];
                           SPD( playerid, dialog_VEHCHOSEN, DSL, "Vozilo", "Informacije\nParkiraj\nLociraj\nUgradi GPS\nProdaj igracu\nProdaj otpadu\nMakni tuning\nNeon\nGepek\nPromeni boju", "Odaberi", "Nazad" );
                       }
                       else {
                     SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Ovo vozilo nije u vasem vlasnistvu, obratite se na forumu ako mislite je greska." );
                  }
               }
               else {
                   SCM( playerid, ANTICHEAT, ""col_red"[HIAC]"col_white" Vase vozilo ne postoji u bazi podataka, obratite se na forumu ako mislite je greska." );
               }
            }
         }
      }
   }
   else if( dialogid == dialog_VEHCHOSEN ) {
       if( !response ) return 1;
      if( response ) {
         switch( listitem ) {
             case 0: {
                 new izbor = ChosenVehicle[ playerid ];
                
               //if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");
                    strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
               format( globalstring, sizeof( globalstring ), ""col_white"___________"col_pinki"Vozilo: "col_white"%s ["col_pinki"Model ID: "col_white"%d]___________\n\n", ImeVozila[ VehicleInfo[ izbor ][ vModel ]-400 ],  VehicleInfo[ izbor ][ vModel ] );
               strcat( DialogStrgEx, globalstring);

               format( globalstring, sizeof( globalstring ), ""col_pinki"Kljuc vozila: "col_white"%d\n", izbor );
               strcat( DialogStrgEx, globalstring);
               
               format( globalstring, sizeof( globalstring ), ""col_pinki"ID vozila: "col_white"%d\n", VehicleInfo[ izbor ][ vID ] );
               strcat( DialogStrgEx, globalstring);

                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");

               if( VehicleInfo[ izbor ][ vReg ] == 1 ) {
               
                   new tablice[ 50 ];
                  if( 10 > VehicleInfo[ izbor ][ vID ] ) { format( tablice, sizeof( tablice ), "LS 000%d.", VehicleInfo[ izbor ][ vID ] ); }
                  else if( 10 <= VehicleInfo[ izbor ][ vID ] && VehicleInfo[ izbor ][ vID ] < 100 ) { format( tablice , sizeof( tablice ), "LS 00%d.", VehicleInfo[ izbor ][ vID ] ); }
                  else if( 100 <= VehicleInfo[ izbor ][ vID ] && VehicleInfo[ izbor ][ vID ] < 1000 ) { format( tablice, sizeof( tablice ), "LS 0%d.", VehicleInfo[ izbor ][ vID ] ); }
                    else if( 1000 <= VehicleInfo[ izbor ][ vID ] && VehicleInfo[ izbor ][ vID ] < 2001 ) { format( tablice, sizeof( tablice ), "LS %d.", VehicleInfo[ izbor ][ vID ] ); }
               
                   format( globalstring, sizeof( globalstring ), ""col_pinki"Registracija: "col_white"%s\n",  tablice );
                  strcat( DialogStrgEx, globalstring);
                  format( globalstring, sizeof( globalstring ), ""col_pinki"Registrovan jos: "col_white"%dh\n",  VehicleInfo[ izbor ][ vRegVreme ] );
                  strcat( DialogStrgEx, globalstring);
               }
               else if( VehicleInfo[ izbor ][ vReg ] == 2 ) {
               
                   format( globalstring, sizeof( globalstring ), ""col_pinki"Registracija: "col_white"%s\n",  VehicleInfo[ izbor ][ vTablice ] );
                  strcat( DialogStrgEx, globalstring);
                  format( globalstring, sizeof( globalstring ), ""col_pinki"Registrovan jos: "col_white"%dh\n",  VehicleInfo[ izbor ][ vRegVreme ] );
                  strcat( DialogStrgEx, globalstring);
               }
               else {
               
                   format( globalstring, sizeof( globalstring ), ""col_pinki"Vase vozilo je neregistrovano. "col_white"%dh\n",  VehicleInfo[ izbor ][ vRegVreme ] );
                  strcat( DialogStrgEx, globalstring);
                  strcat( DialogStrgEx, "Na -720h vase vozilo se prodaje na aukciju\n" );
               }
               
                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
               if( VehicleInfo[ izbor ][ vLocked ] == 1)
                  strcat( DialogStrgEx, ""col_pinki"Status brave: "col_white"Zakljucano\n");
               else
                  strcat( DialogStrgEx, ""col_pinki"Status brave: "col_white"Otkljucano\n");
                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
                    format( globalstring, sizeof( globalstring ), ""col_pinki"Vrsta goriva: "col_white"%s\n", GetVehicleFuelType( VehicleInfo[ izbor ][ vID ] ) );
               strcat( DialogStrgEx, globalstring);
                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
                    format( globalstring, sizeof( globalstring ), ""col_pinki"Predjena kilometraza: "col_white"%d\n", VehicleInfo[ izbor ][ vKilometri ] );
               strcat( DialogStrgEx, globalstring);
                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
               if( VehicleInfo[ izbor ][ vLock ] == 0)
                  strcat( DialogStrgEx, ""col_pinki"Kvaliteta brave: "col_white"Nekvalitetna\n");
               else {
                  format( globalstring, sizeof( globalstring ), ""col_pinki"Kvaliteta brave: "col_white"%d\n",  VehicleInfo[ izbor ][ vLock ] );
                  strcat( DialogStrgEx, globalstring);
               }
                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
                 if( VehicleInfo[ izbor ][ vImobilizator ] == 0)
                  strcat( DialogStrgEx, ""col_pinki"Imobilizator: "col_white"Nekvalitetan\n");
               else {
                   format( globalstring, sizeof( globalstring ), ""col_pinki"Imobilizator level: "col_white"%d\n",  VehicleInfo[ izbor ][ vImobilizator ] );
                  SCM( playerid, BELA, globalstring);
               }
               strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
                   
               if( VehicleInfo[ izbor ][ vAlarm ] > 0) {
                  format( globalstring, sizeof( globalstring ), ""col_pinki"Alarm level: "col_white"%d\n",  VehicleInfo[ izbor ][ vAlarm] );
                  strcat( DialogStrgEx, globalstring);
               } else strcat( DialogStrgEx, ""col_pinki"Alarm: "col_white"Nema\n");
                    strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________\n");
                 if( VehicleInfo[ izbor ][ vGPS ] > 0) {
                   if( VehicleInfo[ izbor ][ vGPS ] == 1)
                      strcat( DialogStrgEx, ""col_pinki"GPS: "col_white"Jednostavan\n");
                  else if( VehicleInfo[ izbor ][ vGPS ] == 2)
                         strcat( DialogStrgEx, ""col_pinki"GPS: "col_white"Napredan\n");
               } else strcat( DialogStrgEx, ""col_pinki"GPS: "col_white"Nema\n");

               strcat( DialogStrgEx, ""col_pinki"__________________________"col_white"__________________________");
               SPD( playerid, 0, DSMSG, D_NASLOV, DialogStrgEx, "Ok", "" );
                strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
            }
             case 1: {
                 new izbor = ChosenVehicle[ playerid ], Float:HP, Float:Pos[ 4 ];

               if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");
                    if( GetPlayerVehicleSeat( playerid ) != 0) return GRESKA( playerid, "Morate biti u svom vozilu na vozackom mjestu!");
                    if( IsPlayerInArea( playerid, 1486.062, -1776.608, 1653.387, -1567.377 ) ) return GRESKA( playerid, "Ne mozete parkirati auto u blizini policije!");
               if( IsPlayerInArea( playerid, 1136.201, -1014.694, 1311.132, -856.7839 ) ) return GRESKA( playerid, "Ne mozete parkirati auto u blizini burga!");
               if( IsPlayerInArea( playerid, 1383.386, -1077.857, 1554.513, -947.582 ) ) return GRESKA (playerid, "Ne mozete parkirati auto u blizini banke!");
                    GetVehicleHealth( GetPlayerVehicleID( playerid ), HP );
               if( HP < 800.0 ) return GRESKA( playerid, "Motor vam je previse ostecen, ne mozete ga parkirati.");

                    GetVehiclePos( VehicleInfo[ izbor ][ vID ], Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
               GetVehicleZAngle( VehicleInfo[ izbor ][ vID ], Pos[ 3 ] );
                   
                    VehicleInfo[ izbor ][ vVirtualWorld ] = GetPlayerVirtualWorld( playerid );
               VehicleInfo[ izbor ][ vInterior ] = GetPlayerInterior( playerid );
               
               VehicleInfo[ izbor ][ vLokacijaX ] = Pos[ 0 ];
               VehicleInfo[ izbor ][ vLokacijaY ] = Pos[ 1 ];
               VehicleInfo[ izbor ][ vLokacijaZ ] = Pos[ 2 ];
               VehicleInfo[ izbor ][ vLokacijaA ] = Pos[ 3 ];

                    DestroyVehicle( VehicleInfo[ izbor ][ vID ] );
               VehicleInfo[ izbor ][ vID ] = Pinki_CreateVehicle( izbor, PRIVATNO_VOZILO, -1, -1, -1, VehicleInfo[ izbor ][ vModel ], VehicleInfo[ izbor ][ vLokacijaX ], VehicleInfo[ izbor ][ vLokacijaY ], VehicleInfo[ izbor ][ vLokacijaZ ]+1.0, VehicleInfo[ izbor ][ vLokacijaA ], VehicleInfo[ izbor ][ vColor1 ], VehicleInfo[ izbor ][ vColor2 ], 300000 );
               LinkVehicleToInterior( VehicleInfo[ izbor ][ vID ], VehicleInfo[ izbor ][ vInterior ] );
                SetVehicleVirtualWorld( VehicleInfo[ izbor ][ vID ], VehicleInfo[ izbor ][ vVirtualWorld ] );

                    TuneVehicle( izbor );
                   
                 SetVehicleParamsEx( VehicleInfo[ izbor ][ vID ], 0, 0, 0, VehicleInfo[ izbor ][ vLocked ], 0, 0, 0 );
                  if( IsVehicleBajs( VehicleInfo[ izbor ][ vID ] ) ) {
                  SetVehicleParamsEx( VehicleInfo[ izbor ][ vID ], 1, 0, 0, VehicleInfo[ izbor ][ vLocked ], 0, 0, 0 );
               }

               SaveVehicle( izbor );
               
               SendInfoMessage( playerid, "Uspesno ste parkirali vozilo!");
             }
             case 2: {
                 new izbor = ChosenVehicle[ playerid ];
               if( VehicleInfo[ izbor ][ vGPS ] == 0 ) return GRESKA( playerid, "Ne posjedujete GPS na ovom vozilu.");
               if( GetPVarInt( playerid, "LocatingCar" ) == 0 ) {
                    GameTextForPlayer( playerid, "~y~spajanje na satelit...", 4000, 1);
                    SetPVarInt( playerid, "GPSConnectTimer", SetTimerEx("GPSConnect", 5000, 0, "iii", playerid, 1, VehicleInfo[ izbor ][ vID ] ) );
                    SetPVarInt( playerid, "GPSTimerCalled", 1);
               }
               else if(GetPVarInt( playerid, "LocatingCar") == 1) {
                   SetPVarInt( playerid, "LocatingCar", 0);
                  GameTextForPlayer( playerid, "~r~gps ugasen", 4500, 1);
                  CheckpointStatus[ playerid ] = 0;
                  PlayerPlaySound( playerid, 1145, 0.0, 0.0, 0.0);
                  Pinki_DisablePlayerCheckpoint( playerid );
               }
             }
             case 3: {
                 new izbor = ChosenVehicle[ playerid ];
               if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");
               if( VehicleInfo[ izbor ][ vGPS ] == 2 ) return GRESKA( playerid, "Vase vozilo vec ima najbolji gps!");
               if( KupljenGPS[ playerid ] != 1 ) return GRESKA( playerid, "Prvo trebate kupiti GPS u electronic shopu." );
                VehicleInfo[ izbor ][ vGPS ] ++; SaveVehicle( izbor );
               SCM( playerid, SVETLOPLAVA, "Uspesno si unapredio svoj GPS sistem." );
             }
             case 4: {
                 new izbor = ChosenVehicle[ playerid ];
                 if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");
                    SPD( playerid, dialog_VEHSELLTP, DSI, D_NASLOV, "Unesite id igraca kome zelite da prodate vozilo i cenu.\nPrimer: 145 12003", D_ODABERI, D_ODUSTANI );
             }
             case 5: {
                 new izbor = ChosenVehicle[ playerid ];
                 if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");
                 if( !IsPlayerInRangeOfPoint( playerid, 10.0, 732.3741, -96.0712, 21.4718 ) ) return GRESKA( playerid, "Da biste koristili ovu komandu morati biti na vagi na otpadu." );

                    new string1[ 128 ];
               format( string1, sizeof( string1 ), "Igrac %s je prodao vozilo %s na otpad", ImeIgraca( playerid ), GetVehicleNameEx( VehicleInfo[ izbor ][ vModel ] ) );
               LogSave( "Ostalo/LogProdajaVozila.log", string1 );

                 DajIgracuNovac( playerid, VehicleInfo[ izbor ][ vPrice ]/10 );
               SendClientMessageEx( playerid, ZUTA, "Dobili ste %d$ od otpada za ovo vozilo.", VehicleInfo[ izbor ][ vPrice ]/10 );

               if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == VehicleInfo[ izbor ][ vProvera ] ) { PlayerInfo[ playerid ][ xVoziloID ][ 0 ] = -1; }
                else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == VehicleInfo[ izbor ][ vProvera ] ) { PlayerInfo[ playerid ][ xVoziloID ][ 1 ] = -1; }
                else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == VehicleInfo[ izbor ][ vProvera ] ) { PlayerInfo[ playerid ][ xVoziloID ][ 2 ] = -1; }
                else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == VehicleInfo[ izbor ][ vProvera ] ) { PlayerInfo[ playerid ][ xVoziloID ][ 3 ] = -1; }

               SavePlayer( playerid );
               Pinki_DestroyVehicle( VehicleInfo[ izbor ][ vID ] );
               
               VehicleInfo[ izbor ][ vVirtualWorld ] = 0;
               VehicleInfo[ izbor ][ vInterior ] = 0;
               
               VehicleInfo[ izbor ][ vOwned ] = 0;
               VehicleInfo[ izbor ][ vNeaktivnost ] = 0;
               VehicleInfo[ izbor ][ vPrice ] = -1;

               VehicleInfo[ izbor ][ vLokacijaX ] = -2112.0281;
               VehicleInfo[ izbor ][ vLokacijaY ] = 2729.6250;
               VehicleInfo[ izbor ][ vLokacijaZ ] = 166.0840;
               VehicleInfo[ izbor ][ vLokacijaA ] = 202.9713;
               
               VehicleInfo[ izbor ][ vID ] = Pinki_CreateVehicle( izbor, PRIVATNO_VOZILO, -1, -1, -1, VehicleInfo[ izbor ][ vModel ], VehicleInfo[ izbor ][ vLokacijaX ], VehicleInfo[ izbor ][ vLokacijaY ], VehicleInfo[ izbor ][ vLokacijaZ ]+1.0, VehicleInfo[ izbor ][ vLokacijaA ], VehicleInfo[ izbor ][ vColor1 ], VehicleInfo[ izbor ][ vColor2 ], 300000 );
               LinkVehicleToInterior( VehicleInfo[ izbor ][ vID ], VehicleInfo[ izbor ][ vInterior ] );
                SetVehicleVirtualWorld( VehicleInfo[ izbor ][ vID ], VehicleInfo[ izbor ][ vVirtualWorld ] );
               
               TuneVehicle( izbor );

                 SetVehicleParamsEx( VehicleInfo[ izbor ][ vID ], 0, 0, 0, VehicleInfo[ izbor ][ vLocked ], 0, 0, 0 );
                  if( IsVehicleBajs( VehicleInfo[ izbor ][ vID ] ) ) {
                  SetVehicleParamsEx( VehicleInfo[ izbor ][ vID ], 1, 0, 0, VehicleInfo[ izbor ][ vLocked ], 0, 0, 0 );
               }

               SaveVehicle( izbor );

               SCM( playerid, BELA, "Vase vozilo je uspesno prodano na otpad!");
             }
             case 6: {
                 new izbor = ChosenVehicle[ playerid ];
               if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");

               if( Neon[ VehicleInfo[ izbor ][ vID ] ] == 1) {
                   Neon[ VehicleInfo[ izbor ][ vID ] ] = 0;
                   DestroyDynamicObject( NeonObject1[ VehicleInfo[ izbor ][ vID ] ] );
                    DestroyDynamicObject( NeonObject2[ VehicleInfo[ izbor ][ vID ] ] );
               }

               VehicleInfo[ izbor ][ vNeon ] = 0;
                VehicleInfo[ izbor ][ vTuned ] = 0;
                VehicleInfo[ izbor ][ vImobilizator ] = 0;
                VehicleInfo[ izbor ][ vSpoiler ] = 0;
                VehicleInfo[ izbor ][ vHood ] = 0;
                VehicleInfo[ izbor ][ vRoof ] = 0;
                VehicleInfo[ izbor ][ vSkirt ] = 0;
                VehicleInfo[ izbor ][ vLamps ] = 0;
                VehicleInfo[ izbor ][ vNitro ] = 0;
                VehicleInfo[ izbor ][ vExhaust ] = 0;
                VehicleInfo[ izbor ][ vWheels ] = 0;
                VehicleInfo[ izbor ][ vStereo ] = 0;
                VehicleInfo[ izbor ][ vHydraulics ] = 0;
                VehicleInfo[ izbor ][ vFrontBumper ] = 0;
                VehicleInfo[ izbor ][ vRearBumper ] = 0;
                VehicleInfo[ izbor ][ vVents ] = 0;
                VehicleInfo[ izbor ][ vPaintJob ] = 255;
                ChangeVehiclePaintjob( VehicleInfo[ izbor ][ vID ], 3 );
                new componentid;

               for( new i; i < 14; i++ ) {
                   componentid = GetVehicleComponentInSlot( VehicleInfo[ izbor ][ vID ], i );
                   if( componentid != 0 )
                       RemoveVehicleComponent( VehicleInfo[ izbor ][ vID ], componentid );
               }

               SCM( playerid, SVETLOCRVENA, "Skinuli ste tuning sa vozila." );
               SaveVehicle( izbor );
             }
             case 7: {
                 new izbor = ChosenVehicle[ playerid ];
               if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");
                if( GetPlayerVehicleSeat( playerid ) != 0) return GRESKA( playerid, "Morate biti u svom vozilu na vozackom mjestu!");
                if( VehicleInfo[ izbor ][ vNeon ] == 0 ) return GRESKA( playerid, "Na ovom vozilu nije ugradjena neonka!");
               if( Neon[ VehicleInfo[ izbor ][ vID ] ] == 0 ) {
                  Neon[ VehicleInfo[ izbor ][ vID ] ] = 1;
                      NeonObject1[ VehicleInfo[ izbor ][ vID ] ] = CreateDynamicObject( VehicleInfo[ izbor ][ vNeon ], 0, 0, 1500, 0, 0, 0 );
                     NeonObject2[ VehicleInfo[ izbor ][ vID ] ] = CreateDynamicObject( VehicleInfo[ izbor ][ vNeon ], 0, 0, 1500, 0, 0, 0 );
                      AttachDynamicObjectToVehicle( NeonObject1[ VehicleInfo[ izbor ][ vID ] ],  VehicleInfo[ izbor ][ vID ] , -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                      AttachDynamicObjectToVehicle( NeonObject2[ VehicleInfo[ izbor ][ vID ] ],  VehicleInfo[ izbor ][ vID ] , 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                  format( globalstring, sizeof( globalstring ), "* %s pritisce dugme na komodi i postavlja neonke.", ImeIgraca( playerid ) );
                     PorukaRadius(30.0, playerid, globalstring, LJUBICASTA );
               }
                 else if( Neon[ VehicleInfo[ izbor ][ vID ] ] == 1 ) {
                     Neon[ VehicleInfo[ izbor ][ vID ] ] = 0;
                     DestroyDynamicObject( NeonObject1[ VehicleInfo[ izbor ][ vID ] ] );
                     DestroyDynamicObject( NeonObject2[ VehicleInfo[ izbor ][ vID ] ] );
                     format( globalstring, sizeof( globalstring ), "* %s pritisce gumb na komodi i uvlaci neonke.", ImeIgraca( playerid ) );
                     PorukaRadius(30.0, playerid, globalstring, LJUBICASTA );
                 }
             }
             case 8: {
                 SendInfoMessage( playerid, "Koristite /gepek za upravljanje gepekom." );
             }
             case 9: {
                 SPD( playerid, dialog_VEHCOLOR, DSI, D_NASLOV, "Unesi id boje 1 i id boje 2 vozila.\nPrimer: 1 2", D_ODABERI, D_ODUSTANI );
             }
         }
      }
   }
   else if( dialogid == dialog_ACCEPTVEH ) {
       if( response ) {
      
            new seller = GlobalProdaja[ playerid ];
          new autoid = GlobalID[ playerid ];
          
          if( seller == IPI  ) return GRESKA( playerid, "Taj igrac je offline.");
          if( carspawntimer == 1 ) return GRESKA( playerid, "Netko je spawnao/parkirao vozilo prije vas.Pokusajte za 3 sekunde. (Anticrash)");
           if( PlayerInfo[ seller ][ xVoziloID ][ 0 ] != autoid && PlayerInfo[ seller ][ xVoziloID ][ 1 ] != autoid && PlayerInfo[ seller ][ xVoziloID ][ 2 ] != autoid && PlayerInfo[ seller ][ xVoziloID ][ 3 ] != autoid ) return GRESKA( playerid, "To vozilo nije u vlasnistvu igraca koji vam ga je ponudio!");
         if( !IsPlayerNearPlayer(5.0, playerid, seller ) ) return GRESKA( playerid, "Niste blizu igraca koji vam zeli prodati vozilo.");
         if( PlayerInfo[ playerid ][ xNovac ] < GlobalCena[ playerid ] ) return GRESKA( playerid, "Nemate dovoljno novca za kupiti vozilo.");
         if( !IsPlayerConnected( seller ) ) {
            GRESKA( playerid, "Taj igrac je offline.");
            GlobalProdaja[ playerid ] = -1;
            GlobalCena[ playerid ] = -1;
            GlobalID[ playerid ] = -1;
            return 1;
         }

         if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == -1 ) { }
           else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == -1 ) { }
           else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == -1 ) { }
           else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == -1 ) {
            if( PlayerInfo[ playerid ][ xDonatorSlot ] == true ) { }
            else return GRESKA( playerid, "Svi slotovi vozila su vam zauzeti." );
         }
         else return GRESKA( playerid, "Svi slotovi vozila su vam zauzeti." );

         strmid( VehicleInfo[ autoid ][ vOwner ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 24);

         if( PlayerInfo[ seller ][ xVoziloID ][ 0 ] == VehicleInfo[ autoid ][ vProvera ] ) { PlayerInfo[ seller ][ xVoziloID ][ 0 ] = -1; }
          else if( PlayerInfo[ seller ][ xVoziloID ][ 1 ] == VehicleInfo[ autoid ][ vProvera ] ) { PlayerInfo[ seller ][ xVoziloID ][ 1 ] = -1; }
          else if( PlayerInfo[ seller ][ xVoziloID ][ 2 ] == VehicleInfo[ autoid ][ vProvera ] ) { PlayerInfo[ seller ][ xVoziloID ][ 2 ] = -1; }
          else if( PlayerInfo[ seller ][ xVoziloID ][ 3 ] == VehicleInfo[ autoid ][ vProvera ] ) { PlayerInfo[ seller ][ xVoziloID ][ 3 ] = -1; }

         if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == -1){ PlayerInfo[ playerid ][ xVoziloID ][ 0 ] = autoid;}
         else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == -1) { PlayerInfo[ playerid ][ xVoziloID ][ 1 ] = autoid; }
         else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == -1) { PlayerInfo[ playerid ][ xVoziloID ][ 2 ] = autoid; }
         else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == -1) { PlayerInfo[ playerid ][ xVoziloID ][ 3 ] = autoid; }

           new string1[ 128 ];
         format( string1, sizeof( string1 ), "Igrac %s je prodao vozilo %s igracu %s za %d", ImeIgraca( seller ), GetVehicleNameEx( VehicleInfo[ autoid ][ vModel ] ), ImeIgraca( playerid ), GlobalCena[ playerid ] );
         LogSave( "Ostalo/LogProdajaVozila.log", string1 );

         SaveVehicle( autoid );
         DajIgracuNovac( seller, GlobalCena[ playerid ] );
         Pinki_RemovePlayerFromVehicle( seller );

         DajIgracuNovac( playerid, -GlobalCena[ playerid ] );
         SendInfoMessage( playerid, "Uspesno ste kupili vozilo." );
         SendInfoMessage( seller, "Uspesno ste prodali vozilo." );

           carspawntimer = 1;
         SetTimer("AntiSpawnCrash", 3000, 0);
         
         GlobalProdaja[ playerid ] = -1;
         GlobalCena[ playerid ] = -1;
         GlobalID[ playerid ] = -1;
       }
       else if( !response ) {
         format( globalstring, sizeof( globalstring ),"Igrac %s je odbio vasu ponudu za kupovinu vozla!", ImeIgraca( playerid ) );
         SCM( GlobalProdaja[ playerid ], -1, globalstring );
         SCM( playerid, -1, "Odbili ste ponudu!");
         GlobalProdaja[ playerid ] = -1;
         GlobalCena[ playerid ] = -1;
         GlobalID[ playerid ] = -1;
       }
   }
   else if( dialogid == dialog_VEHSELLTP ) {
       if( !response ) return 1;
      if( response ) {
           new idigraca, string[ 128 ], cena, autoid = ChosenVehicle[ playerid ];
         if( sscanf( inputtext, "ui", idigraca, cena ) ) return SPD( playerid, dialog_VEHSELLTP, DSI, D_NASLOV, "Unesite id igraca kome zelite da prodate vozilo i cenu.\nPrimer: 145 12003", D_ODABERI, D_ODUSTANI );
         if( !IsPlayerConnected( idigraca ) || idigraca == INVALID_PLAYER_ID ) return GRESKA( playerid, "Nevaljan ID igraca.");
         if( !IsPlayerNearPlayer( 5.0, playerid, idigraca ) ) return GRESKA( playerid, "Taj igrac nije blizu vas !");
            if( idigraca == playerid ) return GRESKA( playerid, "Ne mozes sam sebi prodati vozilo!");

           if( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] == autoid ) { }
           else if( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] == autoid ) { }
           else if( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] == autoid ) { }
           else if( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] == autoid ) { }
         else return GRESKA( playerid, "Broj vozila koji ste uneli nije u vasem vlasnistvu." );

           if( PlayerInfo[ idigraca ][ xVoziloID ][ 0 ] == -1 ) { }
           else if( PlayerInfo[ idigraca ][ xVoziloID ][ 1 ] == -1 ) { }
           else if( PlayerInfo[ idigraca ][ xVoziloID ][ 2 ] == -1 ) { }
           else if( PlayerInfo[ idigraca ][ xVoziloID ][ 3 ] == -1 ) {
            if( PlayerInfo[ idigraca ][ xDonatorSlot ] == true ) { }
            else return GRESKA( playerid, "Svi slotovi vozila izabranog igraca su zauzeti." );
         }
         else return GRESKA( playerid, "Svi slotovi vozila izabranog igraca su zauzeti." );

         if( cena < ( VehicleInfo[ autoid ][ vPrice ]/2 ) ) return GRESKA( playerid, "Cena mora biti veca od polovine kupljene.");

           if( !IsVehicleBajs( VehicleInfo[ autoid ][ vID ] ) ) {
            if( PlayerInfo[ idigraca ][ xLevel ] < 5 ) return GRESKA( playerid, "Igrac mora biti level 5+ da bi ste mu prodali vozilo." );
         }

            SendClientMessageEx( playerid, SVETLOPLAVA, "Ponudili ste igracu %s vozilo po ceni od %d.", ImeIgraca( idigraca ), cena );
         GlobalProdaja[ idigraca ] = playerid;
         GlobalCena[ idigraca ] = cena;
         GlobalID[ idigraca ] = autoid;
         format( string, sizeof( string ), "Igrac %s vam je ponudio da kupite njegovo vozilo marke %s za %d", ImeIgraca( playerid ), GetVehicleNameEx( VehicleInfo[ autoid ][ vModel ] ), cena );
         SPD( idigraca, dialog_ACCEPTVEH, DSMSG, D_NASLOV, string, "Prihvati", "Odbij" );

       }
   }
   else if( dialogid == dialog_VEHCOLOR ) {
       if( !response ) return 1;
      if( response ) {
          new boja1, boja2, izbor = ChosenVehicle[ playerid ];
          if( sscanf( inputtext, "ii", boja1, boja2 ) ) SPD( playerid, dialog_VEHCOLOR, DSI, D_NASLOV, "Unesi id boje 1 i id boje 2 vozila.\nPrimer: 1 2", D_ODABERI, D_ODUSTANI );

           if( boja1 < 0 || boja1 > 255 ) return GRESKA( playerid, "Prva boja ne moze biti manja od 0 ili veca od 255.");
          if( boja2 < 0 || boja2 > 255 ) return GRESKA( playerid, "Druga boja ne moze biti manja od 0 ili veca od 255.");

            if( !IsPlayerInVehicle( playerid, VehicleInfo[ izbor ][ vID ] ) ) return GRESKA( playerid, "Morate biti u svom vozilu!");

         VehicleInfo[ izbor ][ vColor1 ] = boja1;
          VehicleInfo[ izbor ][ vColor2 ] = boja2;
          SaveVehicle( izbor );

         ChangeVehicleColor( VehicleInfo[ izbor ][ vID ], boja1, boja2 );
         SendInfoMessage( playerid, "Promenili ste boju vozila u %d, %d.", boja1, boja2 );
      }
   }[/pawn]
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://i.imgur.com/LQvmemR.png , http://i.imgur.com/AWHe4Yf.png

i am king!

Jednostavno uzmi neki stariji mod (BM,BE) i kopiraj komandu CMD:v i prilagodi je sebi. Mada mislim da je tamo cak strcmp ali dobro. Uglavnom napravis cmd koristis se sscanfom i strcmp i tjt. Mozes napraviti i bez gledanja u drugi mod

Citat: [EM] Tosic ãƒ,, poslato Oktobar 23, 2016, 09:13:07 PRE PODNE
Jednostavno uzmi neki stariji mod (BM,BE) i kopiraj komandu CMD:v i prilagodi je sebi. Mada mislim da je tamo cak strcmp ali dobro. Uglavnom napravis cmd koristis se sscanfom i strcmp i tjt. Mozes napraviti i bez gledanja u drugi mod

Kako mislis bez gledanja drugi mod ?

i am king!

Nista tesko napravis cmd /v i tu sve pobacas iz on dialog response one caseove

Meni nesto nije jasno, kada god sam usao na forum neka tvoja tema stoji, jer ne znas nesto da napravis, a okolo kao drugim ljudima radis modove. U cemu je fazon ? :/
KOPAJ KRIPTOVALUTU TELEFONOM! >>> SAZNAJ VIŠE <<<
POČNI RADITI KAO PREDAVAČ ENGLESKOG JEZIKA! >>> SAZNAJ VIŠE <<<

Citat: Harexe Seljak poslato Oktobar 23, 2016, 22:07:47 POSLE PODNE
Nista tesko napravis cmd /v i tu sve pobacas iz on dialog response one caseove

Mislis da prebacim na CMD?

Citat: TheToretto poslato Oktobar 23, 2016, 22:50:52 POSLE PODNE
Meni nesto nije jasno, kada god sam usao na forum neka tvoja tema stoji, jer ne znas nesto da napravis, a okolo kao drugim ljudima radis modove. U cemu je fazon ? :/

...

i am king!

Prosto je :
Prvo nije ti potrebna ova linija koda : format( string, sizeof( string ),"%s\n%s\n%s\n%s", getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 0 ] ), getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 1 ] ), getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 2 ] ), getVehicleName( PlayerInfo[ playerid ][ xVoziloID ][ 3 ] ) );
SPD( playerid, dialog_VEHLIST, DIALOG_STYLE_LIST, D_NASLOV, string, "Odaberi", "Izlaz" );

Onda uzmes ove case - ove prilagodis svojim komandama tipa :
/v ovo ili /v ono itd...


NiÅ¡ta teÅ¡ko! Kao Å¡to je @[EM] Tosic ãƒ,, rekao, pronaÄ'i taj sistem iz drugog moda, kopiraj ga i prilagodi ga na sscanf poÅ¡to verovatno njega koristiÅ¡, i usput pogledaj integrer-e za sscanf jer će ti trebati da bi taj sistem uradio. :)

Moze li primer iz jednog case 1: { u cmd ?

i am king!