Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
object classes:
'AH6X_DZ','0.59','1','0.05000','[[\"motor\",1],[\"karoserie\",1],[\"elektronika\",0.8]]','[]','0.5'
'AN2_DZ','0.50','1','0.5','[[\"motor\",1],[\"karoserie\",1],[\"elektronika\",0.8]]','[]','0.5'
Mi17_DZ','0.59','1','0.5','[[\"motor\",1],[\"karoserie\",1],[\"elektronika\",0.8]]','[]','0.02'
object_spawns:
45377102677004433 Mi17_DZ [331,[4537.7,10267.7,-0.044]] North West Airfield
103141215534013 AH6X_DZ [312,[4688.44,2574.4,0.001]] Balota Airstrp
215698877555781 AN2_DZ [155,[4201.41,10846.4,0.001]] Runway NE Airfield
When you say you cannot get them to auto-spawn, do you mean the spawn function will not add them into the table at all, or that when the function adds the entry to the table, it does not appear in game?
DELIMITER $$
USE `hivemind`$$
DROP PROCEDURE IF EXISTS `pMain`$$
CREATE DEFINER=`root`@`` PROCEDURE `pMain`()
BEGIN
DECLARE iSpawnNumVeh SMALLINT(3) DEFAULT 35;
CALL pCleanup();
CALL pFixMaxNum;
SELECT SUM(MaxNum) FROM object_classes INTO @iMaxNumTotal;
IF (iSpawnNumVeh > @iMaxNumTotal) THEN
SET iSpawnNumVeh = @iMaxNumTotal;
END IF;
WHILE (fGetVehCount() < iSpawnNumVeh) DO
CALL pSpawn();
END WHILE;
END$$
DELIMITER ;
DELIMITER $$
USE `hivemind`$$
DROP PROCEDURE IF EXISTS `pSpawn`$$
CREATE DEFINER=`root`@`` PROCEDURE `pSpawn`()
BEGIN
DECLARE intOffset INT DEFAULT 0;
DECLARE bDoSpawn TINYINT(1) DEFAULT 0;
DECLARE bSpawned TINYINT(1) DEFAULT 0;
DECLARE iLID INT DEFAULT 0;
WHILE (bDoSpawn = 0) DO
SELECT FLOOR(RAND() * COUNT(*))
INTO intOffset
FROM object_classes;
SELECT Classname, Chance, MaxNum, MaxDamage, MaxFuel, Inventory, Hitpoints
INTO @rsClassname, @rsChance, @rsMaxNum, @rsDamage, @MaxFuel, @Inventory, @rsHitpoints
FROM object_classes
LIMIT intOffset, 1;
IF (fGetClassCount(@rsClassname) < @rsMaxNum) THEN
IF (fGetSpawnFromChance(@rschance) = 1) THEN
SET bDoSpawn = 1;
END IF;
END IF;
END WHILE;
WHILE (bSpawned = 0) DO
SELECT FLOOR(RAND() * COUNT(*))
INTO intOffset
FROM object_spawns
WHERE Classname = @rsClassname;
SET iLID = LAST_INSERT_ID();
INSERT INTO object_data (ObjectUID, Instance, Classname, Damage, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Datestamp)
SELECT ObjectUID, '222', Classname, @rsDamage, '0', Worldspace, @Inventory, @rsHitpoints, @MaxFuel, SYSDATE()
FROM object_spawns
WHERE NOT ObjectUID IN (SELECT DISTINCT ObjectUID FROM object_data)
LIMIT intOffset, 1;
IF (LAST_INSERT_ID() <> iLID) THEN
SET bSpawned = 1;
END IF;
END WHILE;
END$$
DELIMITER ;
ATV_US_EP1 0.5 2 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1]] [] 0.02
car_hatchback 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
datsun1_civil_3_open 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
Fishing_Boat 0.5 1 0.05000 [["motor",0.8]] [] 0.02
Ikarus 0.5 3 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
Old_bike_TK_CIV_EP1 0.5 5 0.05000 [] [] 0.02
S1203_TK_CIV_EP1 0.5 3 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
Skoda% 0.5 3 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
tractor 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass2",1],["glass3",1]] [] 0.02
TT650_TK_CIV_EP1 0.5 2 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
UAZ_Unarmed_TK_EP1 0.5 2 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
UH1H_DZ 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["elektronika",0.8],["mala vrtule",0.8],["velka vrtule",0.8],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
UralCivil2 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
V3S_Civ 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
Volha_2_TK_CIV_EP1 0.5 2 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
BAF_Offroad_D 0.5 2 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
BAF_Offroad_W 0.5 1 0.05000 [["motor",0.8],["karoserie",1],["palivo",0.8],["wheel_1_1_steering",1],["wheel_2_1_steering",1],["wheel_1_2_steering",1],["wheel_2_2_steering",1],["sklo predni P",1],["sklo predni L",1],["glass1",1],["glass3",1]] [] 0.02
AH6X_DZ 0.5 1 0.05000 [["motor",1],["karoserie",1],["elektronika",0.8]] [] 0.5
Mi17_DZ 0.5 1 0.5 [["motor",1],["karoserie",1],["elektronika",0.8]] [] 0.02
AN2_DZ 0.5 1 0.50000 [["motor",1],["karoserie",1],["elektronika",0.8]] [] 0.5