Problem oko spamanja sa motorom KEY_JUMP pali se motor preko tipke S spam u chat

Započeo andreo.pwn, Mart 30, 2023, 18:19:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Nije error ni warning nego ne znam kako da napravim da mi ne spamuje ovo u chatu hocu znaci da kad upalim motor i kad kocim da ne pise motor vozila je vec upaljen, nego normalno da se vozi i ovo cu ukloniti uspijesno ste upalili motor vozila, samo me zanima kako da sprijecim ovaj spam znaci kad palim motor kliknem 10 puta na tastaturi S i 10 puta ispise da pokusavam upaliti motor ako neko zna kako da fixam nek javi bilo bi mi bas od koristi, htio bi sistem kao na BS to mi je cilj.
Deo skripte: [pawn]public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) {

    if( PRESSED( KEY_JUMP ) ) {
        if( IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) {
           new vehicle = GetPlayerVehicleID( playerid ),
            engine,lights,alarm,doors,bonnet,boot,objective;

          if( vCanDrive[ vehicle ] == 0 ) return SendErrorMessage( playerid, "Ovo vozilo je unisteno i ne moze se pokrenuti.");
          if( IsVehicleBajs( vehicle ) ) return SendErrorMessage( playerid, "Stvarno mislis upaliti biciklu? " );
         if( Fuel[ vehicle ] == 0 ) return SendErrorMessage( playerid, "Vozilo nema goriva ne mozete ga upaliti." );

         if( TipVozila[ vehicle ] == PRIVATNO_VOZILO ) {
         
            if( PI[ playerid ][ xAdmin ] >= 5 ) { }
            else {
                 if( PI[ playerid ][ xVoziloID ][ 0 ] != -1 && VehicleInfo[ PI[ playerid ][ xVoziloID ][ 0 ] ][ vID ] == vehicle ) { }
                else if( PI[ playerid ][ xVoziloID ][ 1 ] != -1 && VehicleInfo[ PI[ playerid ][ xVoziloID ][ 1 ] ][ vID ] == vehicle ) { }
                else if( PI[ playerid ][ xVoziloID ][ 2 ] != -1 && VehicleInfo[ PI[ playerid ][ xVoziloID ][ 2 ] ][ vID ] == vehicle ) { }
                else if( PI[ playerid ][ xVoziloID ][ 3 ] != -1 && VehicleInfo[ PI[ playerid ][ xVoziloID ][ 3 ] ][ vID ] == vehicle ) { }
                    else if( PI[ playerid ][ xRezervniKljucevi ] == ScriptIDVozila[ vehicle ] ) { }
               else return SendErrorMessage( playerid, "Ovo nije vase vozilo." );
            }

               GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
            if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
               if( Maskuse[ playerid ] == true )
                  format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
               else
               format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
            PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
            SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
            SetPVarInt( playerid, "StartingVehicle", 1 );
         
         }
           else if( TipVozila[ vehicle ] == ORGANIZACIJSKO_VOZILO ) {
            if( OrgaVozila[ vehicle ] == PI[ playerid ][ xClan ] || PI[ playerid ][ xAdmin ] >= 5 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
         
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            
            }
           }
           else if( TipVozila[ vehicle ] == POSLOVNO_VOZILO ) {

            if( PosaoVozila[ vehicle ] == PI[ playerid ][ xPosao ] || PI[ playerid ][ xAdmin ] >= 5 ) {
                GetVehicleParamsEx(vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
                if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
               if( Maskuse[ playerid ] == true )
                        format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                   else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
            
            }
            else {
                SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            }
         }
         else if( TipVozila[ vehicle ] == RENTANO_VOZILO ) {
            if( Rentano[ playerid ] == vehicle || PI[ playerid ][ xAdmin ] >= 5 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
            
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
             
            }
           }
           else if( TipVozila[ vehicle ] == GRADONACELNIKOVO_VOZILO ) {
            if( PI[ playerid ][ xGradRank ] == GRAD_DRIVER || PI[ playerid ][ xGradRank ] == GRAD_LDRIVER || PI[ playerid ][ xAdmin ] >= 5 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
   
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuceve od ovog vozila ili uniformu vozaca gradonacelnika!");

            }
           }
           else if( TipVozila[ vehicle ] == IZLOZBENO_VOZILO ) {
            if( PI[ playerid ][ xAdmin ] == 7 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            }
           }
           else if( TipVozila[ vehicle ] == ADMIN_VOZILO ) {
            if( PI[ playerid ][ xAdmin ] >= 1 || PI[ playerid ][ xHelper ] >= 1 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
               return 1;
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            }
           }
         else if( TipVozila[ vehicle ] == PROMOTER_VOZILO ) {
            if( PI[ playerid ][ xAdmin ] >= 5 || PI[ playerid ][ xPromoter ] >= 1 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
               return 1;
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            }
           }
           else if( TipVozila[ vehicle ] == VIP_VOZILO ) {
            if( PI[ playerid ][ xAdmin ] >= 5 || PI[ playerid ][ xVIPLevel ] >= 1 ) {
                GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
               return 1;
            }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            }
           }
         else if( TipVozila[ vehicle ] == POLAGANJE_VOZILO ) {
             if( PI[ playerid ][ xAdmin ] >= 5 || Polaganje[ playerid ] >= 1 ) {
                 GetVehicleParamsEx( vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
               if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
                  if( Maskuse[ playerid ] == true )
                     format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
                  else
                  format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
               PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
               SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
               SetPVarInt( playerid, "StartingVehicle", 1 );
               return 1;
             }
            else {
               SendErrorMessage( playerid, "Nemate kljuc ovog vozila.");
            }
           }
         else {
            GetVehicleParamsEx(vehicle,engine, lights, alarm, doors, bonnet, boot, objective );
             if( engine == 1 ) return SendErrorMessage( playerid, "Motor vozila je vec upaljen." );
            if( Maskuse[ playerid ] == true )
                  format( globalstring, sizeof( globalstring ), "* Maska_%d okrece kljuc i pokusava da upali motor.", PI[ playerid ][ xMaskID ] );
            else
               format( globalstring, sizeof( globalstring ), "* %s okrece kljuc i pokusava da upali motor.", ImeIgraca( playerid ) );
            PorukaRadius( 20.0, playerid, globalstring, LJUBICASTA );
            SetTimerEx( "VehicleEngineStart", 1000, 0, "i", playerid );
            SetPVarInt( playerid, "StartingVehicle", 1 );

          }
      }
    }[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): Video je: https://youtu.be/wksR6szqClY


Citat: choppa100 poslato Mart 30, 2023, 18:26:26 POSLE PODNE
nemoj neko da mu je rekao.
Na ovom forumu si da pomognes ili da gledas kako se nesto pravi, a ne da pises nebuloze drugima toksicna osobo.

Citat: andreo.pwn poslato Mart 30, 2023, 18:31:36 POSLE PODNE
Na ovom forumu si da pomognes ili da gledas kako se nesto pravi, a ne da pises nebuloze drugima toksicna osobo.

Toxican jer jer vam je tesko da naucite mrtve osnove ?

Pa eo ja prvi necu pomoci jer ovo samo retard moze da ne zna...

Mali ne seri svakom pises gluposti i ti taj tvoj toksicni drugar govoris nauci osnove, ovo se zove da pomognes nekom oko skriptanja levatu mutavi ko te takvog sugavog odgoji.
Idi pokrij se i lezi spavati sta blejis ovdje na forumu da siris mrznju.LOCK temu zbog likova koji nemaju pojma o zivotu, TOXIC kids.
Ko je htio pomoci snacu se, ali ovaj realnaith nesto nije dobar s glavom na ovom forumu svakog omalovazava i dira jer je imbecil.poy