Problem oko ucitavanja i kreiranja vozila

Započeo Comi420, Jun 21, 2018, 11:39:01 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Ne kreiraju se vozila tj ne ucitavaju se a kreiraju se i cuvaju ingame normalno
Dio skripte:
forward OnVehiclesLoad( playerid, targetid, moneyauc );
public OnVehiclesLoad( playerid, targetid, moneyauc ) {

	new rows, vehicleid;
   	cache_get_row_count(rows);

	if( rows ) {
		for( new i = 0; i < rows; i ++ ){

            vehicleid = Comi_CreateVehicle( cache_get_value_name_int( i, "v_model", VehicleInfo[ i ][ vModel ] ),
												cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ i ][ vLokacijaX ] ),
												cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ i ][ vLokacijaY ] ),
												cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ i ][ vLokacijaZ ] )+1.0,
												cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ i ][ vLokacijaA ] ),
												cache_get_value_name_int( i, "v_color_1", VehicleInfo[ i ][ vColor1 ] ),
												cache_get_value_name_int( i, "v_color_2", VehicleInfo[ i ][ vColor2 ] ), 300000 );

            cache_get_value_name_int( i, "veh_id", VehicleInfo[ vehicleid ][ vSqlID ] );
			cache_get_value_name_int( i, "owner_sqlID", VehicleInfo[ vehicleid ][ vOwner_sqlID ] );
			strmid( VehicleInfo[ vehicleid ][ vOwner ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 24);
			cache_get_value_name_int( i, "v_price", VehicleInfo[ vehicleid ][ vPrice ] );
			cache_get_value_name_int( i, "v_locked", VehicleInfo[ vehicleid ][ vLocked ] );
			cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ vehicleid ][ vLokacijaX ] );
			cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ vehicleid ][ vLokacijaY ] );
			cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ vehicleid ][ vLokacijaZ ] );
			cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ vehicleid ][ vLokacijaA ] );
			cache_get_value_name_int( i, "v_virtualw", VehicleInfo[ vehicleid ][ vVirtualWorld ] );
			cache_get_value_name_int( i, "v_interior", VehicleInfo[ vehicleid ][ vInterior ] );
			cache_get_value_name_int( i, "v_usage", VehicleInfo[ vehicleid ][ vUsage ] );
			cache_get_value_name_int( i, "v_organization", VehicleInfo[ vehicleid ][ vOrganizationSQLID ] );
			VehicleInfo[ vehicleid ][ vOrganization ] = -1;

			if( VehicleInfo[ vehicleid ][ vOrganizationSQLID ] != 0 ) {
                for( new j = 1; j < MAX_ORG; j++) {
			        if( org_info[ j ][ oID ] == VehicleInfo[ vehicleid ][ vOrganizationSQLID ] ) {
			            VehicleInfo[ vehicleid ][ vOrganization ] = j;
			            break;
			        }
			    }
			}

			cache_get_value_name_int( i, "v_job", VehicleInfo[ vehicleid ][ vJob ] );
			cache_get_value_name_int( i, "v_fuel_station", VehicleInfo[ vehicleid ][ vFuelStation ] );
			cache_get_value_name_int( i, "v_color_1", VehicleInfo[ vehicleid ][ vColor1 ] );
			cache_get_value_name_int( i, "v_color_2", VehicleInfo[ vehicleid ][ vColor2 ] );
			cache_get_value_name_int( i, "v_model", VehicleInfo[ vehicleid ][ vModel ] );
			cache_get_value_name_int( i, "v_teh", VehicleInfo[ vehicleid ][ vTeh ] );
			cache_get_value_name_int( i, "v_reg", VehicleInfo[ vehicleid ][ vReg ] );
			cache_get_value_name_int( i, "v_reg_vreme", VehicleInfo[ vehicleid ][ vRegVreme ] );
			cache_get_value_name( i, "v_tablice", VehicleInfo[ vehicleid ][ vTablice ], 16 );
			cache_get_value_name_int( i, "v_gps", VehicleInfo[ vehicleid ][ vGPS ] );
			cache_get_value_name_int( i, "v_insurance", VehicleInfo[ vehicleid ][ vOsiguranje ] );
			cache_get_value_name_int( i, "v_lock", VehicleInfo[ vehicleid ][ vLock ] );
			cache_get_value_name_int( i, "v_alarm", VehicleInfo[ vehicleid ][ vAlarm ] );
			cache_get_value_name_int( i, "v_fuel", VehicleInfo[ vehicleid ][ vFuel ] );
			cache_get_value_name_int( i, "v_fuel_type", VehicleInfo[ vehicleid ][ vFuelType ] );
			cache_get_value_name_int( i, "v_neon", VehicleInfo[ vehicleid ][ vNeon ] );
		    cache_get_value_name_int( i, "v_tuned", VehicleInfo[ vehicleid ][ vTuned ] );
			cache_get_value_name_int( i, "v_imobilizator", VehicleInfo[ vehicleid ][ vImobilizator ] );
			cache_get_value_name_int( i, "v_spoiler", VehicleInfo[ vehicleid ][ vSpoiler ] );
			cache_get_value_name_int( i, "v_hood", VehicleInfo[ vehicleid ][ vHood ] );
			cache_get_value_name_int( i, "v_roof", VehicleInfo[ vehicleid ][ vRoof ] );
			cache_get_value_name_int( i, "v_skirt", VehicleInfo[ vehicleid ][ vSkirt ] );
			cache_get_value_name_int( i, "v_lamps", VehicleInfo[ vehicleid ][ vLamps ] );
			cache_get_value_name_int( i, "v_nitro", VehicleInfo[ vehicleid ][ vNitro ] );
			cache_get_value_name_int( i, "v_exhaust", VehicleInfo[ vehicleid ][ vExhaust ] );
			cache_get_value_name_int( i, "v_wheels", VehicleInfo[ vehicleid ][ vWheels ] );
			cache_get_value_name_int( i, "v_stereo", VehicleInfo[ vehicleid ][ vStereo ] );
			cache_get_value_name_int( i, "v_hydraulics", VehicleInfo[ vehicleid ][ vHydraulics ] );
			cache_get_value_name_int( i, "v_front_bumper", VehicleInfo[ vehicleid ][ vFrontBumper ] );
			cache_get_value_name_int( i, "v_rear_bumper", VehicleInfo[ vehicleid ][ vRearBumper ] );
			cache_get_value_name_int( i, "v_vents", VehicleInfo[ vehicleid ][ vVents ] );
			cache_get_value_name_int( i, "v_paintjob", VehicleInfo[ vehicleid ][ vPaintJob ] );
			cache_get_value_name_int( i, "v_drug_ammount_1", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 0 ] );
			cache_get_value_name_int( i, "v_drug_ammount_2", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 1 ] );
			cache_get_value_name_int( i, "v_drug_ammount_3", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 2 ] );
			cache_get_value_name_int( i, "v_drug_ammount_4", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 3 ] );
			cache_get_value_name_int( i, "v_drug_ammount_5", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 4 ] );
			cache_get_value_name_int( i, "v_drug_ammount_6", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 5 ] );
			cache_get_value_name_int( i, "v_mats", VehicleInfo[ vehicleid ][ vMaterijali ] );
			cache_get_value_name_int( i, "v_weapon_melee", VehicleInfo[ vehicleid ][ vMelee ] );
			cache_get_value_name_int( i, "v_weapon_slot_1", VehicleInfo[ vehicleid ][ vWeap1 ] );
			cache_get_value_name_int( i, "v_weapon_ammo_1", VehicleInfo[ vehicleid ][ vAmmo1 ] );
			cache_get_value_name_int( i, "v_weapon_slot_2", VehicleInfo[ vehicleid ][ vWeap2 ] );
			cache_get_value_name_int( i, "v_weapon_ammo_2", VehicleInfo[ vehicleid ][ vAmmo2 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_1", VehicleInfo[ vehicleid ][ vGajbica ][ 0 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_2", VehicleInfo[ vehicleid ][ vGajbica ][ 1 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_3", VehicleInfo[ vehicleid ][ vGajbica ][ 2 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_4", VehicleInfo[ vehicleid ][ vGajbica ][ 3 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_5", VehicleInfo[ vehicleid ][ vGajbica ][ 4 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_1", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 0 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_2", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 1 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_3", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 2 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_4", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 3 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_5", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 4 ] );
			cache_get_value_name_int( i, "v_kilometri", VehicleInfo[ vehicleid ][ vKilometri ] );
			cache_get_value_name_int( i, "v_metri", VehicleInfo[ vehicleid ][ vMetri ] );
			VehicleInfo[ vehicleid ][ v_owner_id ] = -1;

			LinkVehicleToInterior( vehicleid, VehicleInfo[ vehicleid ][ vInterior ] );
	        SetVehicleVirtualWorld( vehicleid, VehicleInfo[ vehicleid ][ vVirtualWorld ] );
			vCanDrive[ vehicleid ] = 1;

           	VehicleInfo[ vehicleid ][ Validv3DText ] = false;
	    	if( VehicleInfo[ vehicleid ][ vFuelType ] == 0 ) {

				if( Diesel( vehicleid ) ) VehicleInfo[ vehicleid ][ vFuelType ] = 1;
				else if( Gasoline( vehicleid ) ) VehicleInfo[ vehicleid ][ vFuelType ] = 2;
				else if( GasOil( vehicleid ) ) VehicleInfo[ vehicleid ][ vFuelType ] = 3;
			}

	        SetVehicleParamsEx( vehicleid, 0, 0, 0, VehicleInfo[ vehicleid ][ vLocked ], 0, 0, 0 );
	        if( IsVehicleBajs( vehicleid ) ) {
				SetVehicleParamsEx( vehicleid, 1, 0, 0, VehicleInfo[ vehicleid ][ vLocked ], 0, 0, 0 );
			}
	        ResetVehicleStatistics( vehicleid );
			VehicleInfo[ vehicleid ][ vFuel ] = getAmountFuel( vehicleid );

	   		if( VehicleInfo[ vehicleid ][ vUsage ] == PRIVATNO_VOZILO ) {
	    	    Fuel[ vehicleid ] = VehicleInfo[ vehicleid ][ vFuel ];
	    	}
			else if( VehicleInfo[ vehicleid ][ vUsage ] == POSLOVNO_VOZILO ) {
			    VehicleInfo[ vehicleid ][ vFuel ] = 100;
			    Fuel[ vehicleid ] = 100;
			}
			else {
			    Fuel[ vehicleid ] = getAmountFuel( vehicleid );
			}

			SetVehicleLabels( vehicleid );

			if( VehicleInfo[ vehicleid ][ vReg ] == 1 ) {
				SetTablice( vehicleid );
			}
			else if( VehicleInfo[ vehicleid ][ vReg ] == 2 ) {
				SetVehicleNumberPlate( vehicleid, VehicleInfo[ vehicleid ][ vTablice ] );
			}
			else  {
				SetVehicleNumberPlate( vehicleid, "NEMA" );
			}

			TuneVehicle( vehicleid );

            if( VehicleInfo[ vehicleid ][ vUsage ] == PUMPA_VOZILO ) {

                new fstationID = VehicleInfo[ vehicleid ][ vFuelStation ];

				if( VehicleInfo[ vehicleid ][ vModel ] == 584 ) {
					FuelStation[ fstationID ][ fsCisternID ] = vehicleid;
				}
				else if( VehicleInfo[ vehicleid ][ vModel ] == 403 ) {
					FuelStation[ fstationID ][ fsTruckID ] = vehicleid;
				}

			}

	        #if ZIMSKI_MOD == 1
			if( VehicleInfo[ vehicleid ][ vUsage ] == POSLOVNO_VOZILO && VehicleInfo[ vehicleid ][ vJob ] == POSAO_KOMUNALAC && VehicleInfo[ vehicleid ][ vModel ] == 455 ) {

		 		SnowObjects[ vehicleid ] = true;

			    SnowObject1[ vehicleid ] = CreateDynamicObject( 19601, 0, 0, 1500, 0, 0, 0 );
				AttachDynamicObjectToVehicle( SnowObject1[ vehicleid ], vehicleid, 0.000000, 4.200001, -1.049999, 13.500000, 0.000000, 180.000 );

				SnowObject2[ vehicleid ] = CreateDynamicObject( 18646, 0, 0, 1500, 0, 0, 0 );
				AttachDynamicObjectToVehicle( SnowObject2[ vehicleid ], vehicleid, 0.749999, 1.575000, 1.725000, 0.000000, 0.000000, 0.000000 );
			}
			#endif

			if( playerid != 1001 ) {
			    SendInfoMessage( playerid, "Dodali ste vozilo %s sa aukcije, igracu %s za %d$.", GetVehicleNameEx( VehicleInfo[ vehicleid ][ vModel ] ), ImeIgraca( targetid ), moneyauc );

				new string[ 128 ];
                format( string, sizeof( string ), "AUKCIJA VOZILO SQLID: %d | Prodano igracu %s od admina %s ", VehicleInfo[ vehicleid ][ vSqlID ], ImeIgraca( targetid ), ImeIgraca( playerid ) );
				LogSave( "Ostalo/LogAukcije.log", string );
			}

			if( targetid != 1001 && targetid != IPI ) {

			    for( new j = 0; j < MAX_VEH_SLOT; j ++ ){
	                if( (j+1) <= PlayerInfo[ targetid ][ xSlotoviVozila ] && player_veh[ targetid ][ vehicle_id ][ j ] == -1 ) {
						player_veh[ targetid ][ vehicle_id ][ j ] = vehicleid;
						break;
					}
				}

				VehicleInfo[ vehicleid ][ v_owner_id ] = targetid;
				VehicleInfo[ vehicleid ][ vOwner_sqlID ] = PlayerInfo[ targetid ][ xID ];
				strmid( VehicleInfo[ vehicleid ][ vOwner ], ImeIgraca( targetid ), 0, strlen( ImeIgraca( targetid ) ), 32 );

                VehicleInfo[ vehicleid ][ vPrice ] = VehPrice[ VehicleInfo[ vehicleid ][ vModel ]- 400 ][ 1 ];

                new Float:plocx, Float:plocy, Float:plocz, Float:carangle;
				GetPlayerPos( targetid, plocx, plocy, plocz );
				Comi_SetVehiclePos( vehicleid, plocx, plocy+4, plocz );
                GetVehicleZAngle( vehicleid, carangle );

                VehicleInfo[ vehicleid ][ vVirtualWorld ] = GetPlayerVirtualWorld( targetid );
				VehicleInfo[ vehicleid ][ vInterior ] = GetPlayerInterior( targetid );

				VehicleInfo[ vehicleid ][ vLokacijaX ] = plocx;
				VehicleInfo[ vehicleid ][ vLokacijaY ] = plocy;
				VehicleInfo[ vehicleid ][ vLokacijaZ ] = plocz;
				VehicleInfo[ vehicleid ][ vLokacijaA ] = carangle;

				LinkVehicleToInterior( vehicleid, VehicleInfo[ vehicleid ][ vInterior ] );
		    	SetVehicleVirtualWorld( vehicleid, VehicleInfo[ vehicleid ][ vVirtualWorld ] );

				new q[ 512 ];
				mysql_format( _dbConnector, q, sizeof(q), "UPDATE `vehicles` SET `owner_sqlID` = '%d', `v_price` = '%d', `v_pos_x` = '%f', `v_pos_y` = '%f', `v_pos_z` = '%f', `v_pos_a` = '%f', `v_virtualw` = '%d', `v_interior` = '%d' WHERE `veh_id` = '%d' LIMIT 1",
										VehicleInfo[ vehicleid ][ vOwner_sqlID ],
										VehicleInfo[ vehicleid ][ vPrice ],
										VehicleInfo[ vehicleid ][ vLokacijaX ],
										VehicleInfo[ vehicleid ][ vLokacijaY ],
										VehicleInfo[ vehicleid ][ vLokacijaZ ],
										VehicleInfo[ vehicleid ][ vLokacijaA ],
										VehicleInfo[ vehicleid ][ vVirtualWorld ],
										VehicleInfo[ vehicleid ][ vInterior ],
										VehicleInfo[ vehicleid ][ vSqlID ] );

				mysql_tquery( _dbConnector, q);

				SendInfoMessage( targetid, "Dobili ste vozilo %s sa aukcije, od admina %s za %d$.", GetVehicleNameEx( VehicleInfo[ vehicleid ][ vModel ] ), ImeIgraca( playerid ), moneyauc );

				if( moneyauc != 0 ) DajIgracuNovac( targetid, -moneyauc );


			}
		}
	}
	else {
		if( playerid != 1001 ) {
		    SendInfoMessage( playerid, "Pogresan basesqlID(nepostoji)." );
		}
	}
	return (true);
}



forward OnPlayerVehiclesLoad( playerid );
public OnPlayerVehiclesLoad( playerid ) {

    new rows, vehicleid;
   	cache_get_row_count(rows);

	if( rows ) {
		for( new i = 0; i < rows; i ++ ){

            if( ServerInfo[ BrojKreiranihVozila ] > MaxBrojKreiranih ) return SCM( playerid, ANTICHEAT, "[BALKANIA SECURITY]"col_white" Nemoguce je trenutno kreirati vasa vozila, limit vozila na serveru je dosegnut.");

            vehicleid = Comi_CreateVehicle( cache_get_value_name_int( i, "v_model", VehicleInfo[ i ][ vModel ] ),
												cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ i ][ vLokacijaX ] ),
												cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ i ][ vLokacijaY ] ),
												cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ i ][ vLokacijaZ ] )+1.0,
												cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ i ][ vLokacijaA ] ),
												cache_get_value_name_int( i, "v_color_1", VehicleInfo[ i ][ vColor1 ] ),
												cache_get_value_name_int( i, "v_color_2", VehicleInfo[ i ][ vColor2 ] ), 300000 );

            cache_get_value_name_int( i, "veh_id", VehicleInfo[ vehicleid ][ vSqlID ] );
			cache_get_value_name_int( i, "owner_sqlID", VehicleInfo[ vehicleid ][ vOwner_sqlID ] );
			strmid( VehicleInfo[ vehicleid ][ vOwner ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 24);
			cache_get_value_name_int( i, "v_price", VehicleInfo[ vehicleid ][ vPrice ] );
			cache_get_value_name_int( i, "v_locked", VehicleInfo[ vehicleid ][ vLocked ] );
			cache_get_value_name_float( i, "v_pos_x", VehicleInfo[ vehicleid ][ vLokacijaX ] );
			cache_get_value_name_float( i, "v_pos_y", VehicleInfo[ vehicleid ][ vLokacijaY ] );
			cache_get_value_name_float( i, "v_pos_z", VehicleInfo[ vehicleid ][ vLokacijaZ ] );
			cache_get_value_name_float( i, "v_pos_a", VehicleInfo[ vehicleid ][ vLokacijaA ] );
			cache_get_value_name_int( i, "v_virtualw", VehicleInfo[ vehicleid ][ vVirtualWorld ] );
			cache_get_value_name_int( i, "v_interior", VehicleInfo[ vehicleid ][ vInterior ] );
			cache_get_value_name_int( i, "v_usage", VehicleInfo[ vehicleid ][ vUsage ] );
			cache_get_value_name_int( i, "v_organization", VehicleInfo[ vehicleid ][ vOrganizationSQLID ] );
			VehicleInfo[ vehicleid ][ vOrganization ] = -1;
			cache_get_value_name_int( i, "v_job", VehicleInfo[ vehicleid ][ vJob ] );
			cache_get_value_name_int( i, "v_fuel_station", VehicleInfo[ vehicleid ][ vFuelStation ] );
			cache_get_value_name_int( i, "v_color_1", VehicleInfo[ vehicleid ][ vColor1 ] );
			cache_get_value_name_int( i, "v_color_2", VehicleInfo[ vehicleid ][ vColor2 ] );
			cache_get_value_name_int( i, "v_model", VehicleInfo[ vehicleid ][ vModel ] );
			cache_get_value_name_int( i, "v_teh", VehicleInfo[ vehicleid ][ vTeh ] );
			cache_get_value_name_int( i, "v_reg", VehicleInfo[ vehicleid ][ vReg ] );
			cache_get_value_name_int( i, "v_reg_vreme", VehicleInfo[ vehicleid ][ vRegVreme ] );
			cache_get_value_name( i, "v_tablice", VehicleInfo[ vehicleid ][ vTablice ], 16 );
			cache_get_value_name_int( i, "v_gps", VehicleInfo[ vehicleid ][ vGPS ] );
			cache_get_value_name_int( i, "v_insurance", VehicleInfo[ vehicleid ][ vOsiguranje ] );
			cache_get_value_name_int( i, "v_lock", VehicleInfo[ vehicleid ][ vLock ] );
			cache_get_value_name_int( i, "v_alarm", VehicleInfo[ vehicleid ][ vAlarm ] );
			cache_get_value_name_int( i, "v_fuel", VehicleInfo[ vehicleid ][ vFuel ] );
			cache_get_value_name_int( i, "v_fuel_type", VehicleInfo[ vehicleid ][ vFuelType ] );
			cache_get_value_name_int( i, "v_neon", VehicleInfo[ vehicleid ][ vNeon ] );
		    cache_get_value_name_int( i, "v_tuned", VehicleInfo[ vehicleid ][ vTuned ] );
			cache_get_value_name_int( i, "v_imobilizator", VehicleInfo[ vehicleid ][ vImobilizator ] );
			cache_get_value_name_int( i, "v_spoiler", VehicleInfo[ vehicleid ][ vSpoiler ] );
			cache_get_value_name_int( i, "v_hood", VehicleInfo[ vehicleid ][ vHood ] );
			cache_get_value_name_int( i, "v_roof", VehicleInfo[ vehicleid ][ vRoof ] );
			cache_get_value_name_int( i, "v_skirt", VehicleInfo[ vehicleid ][ vSkirt ] );
			cache_get_value_name_int( i, "v_lamps", VehicleInfo[ vehicleid ][ vLamps ] );
			cache_get_value_name_int( i, "v_nitro", VehicleInfo[ vehicleid ][ vNitro ] );
			cache_get_value_name_int( i, "v_exhaust", VehicleInfo[ vehicleid ][ vExhaust ] );
			cache_get_value_name_int( i, "v_wheels", VehicleInfo[ vehicleid ][ vWheels ] );
			cache_get_value_name_int( i, "v_stereo", VehicleInfo[ vehicleid ][ vStereo ] );
			cache_get_value_name_int( i, "v_hydraulics", VehicleInfo[ vehicleid ][ vHydraulics ] );
			cache_get_value_name_int( i, "v_front_bumper", VehicleInfo[ vehicleid ][ vFrontBumper ] );
			cache_get_value_name_int( i, "v_rear_bumper", VehicleInfo[ vehicleid ][ vRearBumper ] );
			cache_get_value_name_int( i, "v_vents", VehicleInfo[ vehicleid ][ vVents ] );
			cache_get_value_name_int( i, "v_paintjob", VehicleInfo[ vehicleid ][ vPaintJob ] );
			cache_get_value_name_int( i, "v_drug_ammount_1", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 0 ] );
			cache_get_value_name_int( i, "v_drug_ammount_2", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 1 ] );
			cache_get_value_name_int( i, "v_drug_ammount_3", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 2 ] );
			cache_get_value_name_int( i, "v_drug_ammount_4", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 3 ] );
			cache_get_value_name_int( i, "v_drug_ammount_5", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 4 ] );
			cache_get_value_name_int( i, "v_drug_ammount_6", VehicleInfo[ vehicleid ][ vDrugAmmount ][ 5 ] );
			cache_get_value_name_int( i, "v_mats", VehicleInfo[ vehicleid ][ vMaterijali ] );
			cache_get_value_name_int( i, "v_weapon_melee", VehicleInfo[ vehicleid ][ vMelee ] );
			cache_get_value_name_int( i, "v_weapon_slot_1", VehicleInfo[ vehicleid ][ vWeap1 ] );
			cache_get_value_name_int( i, "v_weapon_ammo_1", VehicleInfo[ vehicleid ][ vAmmo1 ] );
			cache_get_value_name_int( i, "v_weapon_slot_2", VehicleInfo[ vehicleid ][ vWeap2 ] );
			cache_get_value_name_int( i, "v_weapon_ammo_2", VehicleInfo[ vehicleid ][ vAmmo2 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_1", VehicleInfo[ vehicleid ][ vGajbica ][ 0 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_2", VehicleInfo[ vehicleid ][ vGajbica ][ 1 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_3", VehicleInfo[ vehicleid ][ vGajbica ][ 2 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_4", VehicleInfo[ vehicleid ][ vGajbica ][ 3 ] );
			cache_get_value_name_int( i, "v_gajbica_slot_5", VehicleInfo[ vehicleid ][ vGajbica ][ 4 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_1", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 0 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_2", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 1 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_3", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 2 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_4", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 3 ] );
			cache_get_value_name_int( i, "v_gajbica_kolicina_5", VehicleInfo[ vehicleid ][ vGajbicaAmmount ][ 4 ] );
			cache_get_value_name_int( i, "v_kilometri", VehicleInfo[ vehicleid ][ vKilometri ] );
			cache_get_value_name_int( i, "v_metri", VehicleInfo[ vehicleid ][ vMetri ] );
			VehicleInfo[ vehicleid ][ v_owner_id ] = playerid;

			LinkVehicleToInterior( vehicleid, VehicleInfo[ vehicleid ][ vInterior ] );
	        SetVehicleVirtualWorld( vehicleid, VehicleInfo[ vehicleid ][ vVirtualWorld ] );
			vCanDrive[ vehicleid ] = 1;

           	VehicleInfo[ vehicleid ][ Validv3DText ] = false;
	    	if( VehicleInfo[ vehicleid ][ vFuelType ] == 0 ) {

				if( Diesel( vehicleid ) ) VehicleInfo[ vehicleid ][ vFuelType ] = 1;
				else if( Gasoline( vehicleid ) ) VehicleInfo[ vehicleid ][ vFuelType ] = 2;
				else if( GasOil( vehicleid ) ) VehicleInfo[ vehicleid ][ vFuelType ] = 3;
			}

	        SetVehicleParamsEx( vehicleid, 0, 0, 0, VehicleInfo[ vehicleid ][ vLocked ], 0, 0, 0 );
	        if( IsVehicleBajs( vehicleid ) ) {
				SetVehicleParamsEx( vehicleid, 1, 0, 0, VehicleInfo[ vehicleid ][ vLocked ], 0, 0, 0 );
			}
	        ResetVehicleStatistics( vehicleid );
			VehicleInfo[ vehicleid ][ vFuel ] = getAmountFuel( vehicleid );

	    	Fuel[ vehicleid ] = VehicleInfo[ vehicleid ][ vFuel ];

			SetVehicleLabels( vehicleid );

			if( VehicleInfo[ vehicleid ][ vReg ] == 1 ) {
				SetTablice( vehicleid );
			}
			else if( VehicleInfo[ vehicleid ][ vReg ] == 2 ) {
				SetVehicleNumberPlate( vehicleid, VehicleInfo[ vehicleid ][ vTablice ] );
			}
			else  {
				SetVehicleNumberPlate( vehicleid, "NEMA" );
			}

			TuneVehicle( vehicleid );

            for( new j = 0; j < MAX_VEH_SLOT; j ++ ){
                if( (j+1) <= PlayerInfo[ playerid ][ xSlotoviVozila ] && player_veh[ playerid ][ vehicle_id ][ j ] == -1 ) {
					player_veh[ playerid ][ vehicle_id ][ j ] = vehicleid;
					break;
				}
			}
		}
	}
	return true;
}



forward Comi_CreateVehicle( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay );
public Comi_CreateVehicle( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay ) {

	if( ServerInfo[ BrojKreiranihVozila ] <= MaxBrojKreiranih ) {
		ServerInfo[ BrojKreiranihVozila ]++;
		new idKreiranog;

		if( color1 < 0 || color2 < 0 ) {
    		color1 = random(127);
       		color2 = random(127);
        }

		if( modelid == 538 ) {
        	idKreiranog = AddStaticVehicleEx( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay );
		}
		else {
			idKreiranog = CreateVehicle( modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay );
		}

        new colorStr[24] ;
        format(colorStr, sizeof(colorStr), "%d-%d", color1, color2);
        setproperty(_, "", PROPERTY_OFFSET(idKreiranog), colorStr);

		RealVehiclePositions[ idKreiranog ][ 0 ] = x;
		RealVehiclePositions[ idKreiranog ][ 1 ] = y;
		RealVehiclePositions[ idKreiranog ][ 2 ] = z;

		BusyVehicle[ idKreiranog ] = -1;
		garbagemanVehicles[ idKreiranog ][ gPlayerID ] = -1;
		return idKreiranog;

	} else return -1;
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
[10:47:59] [debug] #0 004528fc in public Comi_CreateVehicle (modelid=1, Float:x=1.00000, Float:y=1.00000, Float:z=2.00000, Float:angle=1.00000, color1=1, color2=1, respawn_delay=300000) at C:\Users\NAMELESS\Desktop\Project Balkania - MySQL\Server\gamemodes\comi-script.pwn:5538
[10:47:59] [debug] #1 005b8524 in public OnVehiclesLoad (playerid=1001, targetid=1001, moneyauc=0) at C:\Users\NAMELESS\Desktop\Project Balkania - MySQL\Server\gamemodes\comi-script.pwn:23355

Slika/video ingame problema(obavezno ako je ingame problem): //
{ 'HTML, PHP, CSS, JAVASCRIPT, PAWN, C#' }

while(alive) code;


Citat: Tosic ãƒ,, poslato Jun 21, 2018, 16:23:21 POSLE PODNE
Vec sam odgovorio na ovo. Manite se tog moda ako nemate osnove..

http://balkan-samp.com/forum/index.php?topic=121699.msg840680#msg840680

Prvo sam pogledao tu temu i uradio kako si napisao, medjutim ucitava vozila pumpe i privatna vozila ali organizacijska i polovna ne.
{ 'HTML, PHP, CSS, JAVASCRIPT, PAWN, C#' }

while(alive) code;


Ucitavanja vozila se pozivaju na skroz pogresan nacin. Nije potrebno ucitavati ih iz organizacija.. Imas parametar u funkciju koji gleda koriscenje vozila.. (koliko se secam u funkciju ali ne drzi me za rec). Ja sam kod sebe sve te probleme resio i radi odlicno pa cu vcrs pogledati ako ne sredis do tada. Dugo nisam otvarao to pa se ne secam

Citat: Tosic ãƒ,, poslato Jun 21, 2018, 20:03:03 POSLE PODNE
Ucitavanja vozila se pozivaju na skroz pogresan nacin. Nije potrebno ucitavati ih iz organizacija.. Imas parametar u funkciju koji gleda koriscenje vozila.. (koliko se secam u funkciju ali ne drzi me za rec). Ja sam kod sebe sve te probleme resio i radi odlicno pa cu vcrs pogledati ako ne sredis do tada. Dugo nisam otvarao to pa se ne secam

Mod je spreman za upload momci me cekaju ostalo mi samo jos to da fixam pa ako mozes da mi pomognes kumim te
{ 'HTML, PHP, CSS, JAVASCRIPT, PAWN, C#' }

while(alive) code;