My vehicles won't spawn for my new dayz server. When I teleport to vehicles that are in my mysql Object_Data there is nothing there. I also cant find them by searching all of elektro and cherno. Anyone know why?
# maximum number of INSTANCE id's USED.
#-----------------------------------------------
DECLARE sInstance VARCHAR(8) DEFAULT 1;
#-----------------------------------------------
#maximum number of vehicles allowed !!! theoretical max. amount
#-----------------------------------------------
DECLARE iVehSpawnMax INT DEFAULT 100;
#-----------------------------------------------
# DECLARE iVehSpawnMinINT DEFAULT 0;#ToDo !!!
DECLARE iTimeoutMaxINT DEFAULT 250;#number of loops before timeout
DECLARE iTimeoutINT DEFAULT 0;#internal counter for loops done; used to prevent infinite loops - DO NOT CHANGE
DECLARE iNumVehExistingINT DEFAULT 0;#internal counter for already existing vehicles - DO NOT CHANGE
DECLARE iNumClassExistingINT DEFAULT 0;#internal counter for already existing class types - DO NOT CHANGE
DECLARE i INT DEFAULT 1; #internal counter for vehicles spawns - DO NOT CHANGE
#Starts Cleanup
CALL pCleanup();
SELECT COUNT(*)#retrieve the amount of already spawned vehicles...
INTO iNumVehExisting
FROM object_data
WHERE Instance = sInstance
AND Classname != '-'#exclude dummys
AND Classname != 'Hedgehog_DZ'#exclude hedgehog
AND Classname != 'Wire_cat1'#exclude wirecat
AND Classname != 'Sandbag1_DZ'#exclude Sanbag
AND Classname != 'TrapBear'#exclude trap
AND Classname != 'TentStorage';#exclude TentStorage
WHILE (iNumVehExisting < iVehSpawnMax) DO#loop until maximum amount of vehicles is reached
#select a random vehicle class
SELECT Classname, Chance, MaxNum, Damage
INTO @rsClassname, @rsChance, @rsMaxNum, @rsDamage
FROM object_classes ORDER BY RAND() LIMIT 1;
#count number of same class already spawned
SELECT COUNT(*)
INTO iNumClassExisting
FROM object_data
WHERE Instance = sInstance
AND Classname = @rsClassname;
IF (iNumClassExisting < @rsMaxNum) THEN
IF (rndspawn(@rschance) = 1) THEN
INSERT INTO object_data (ObjectUID, Instance, Classname, Damage, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Datestamp)
SELECT ObjectUID, sInstance, Classname, RAND(@rsDamage), '0', Worldspace, Inventory, Hitpoints, RAND(1), SYSDATE()
FROM object_spawns
WHERE Classname = @rsClassname
AND NOT ObjectUID IN (select objectuid from object_data where instance = sInstance)
ORDER BY RAND()
LIMIT 0, 1;
SELECT COUNT(*)
INTO iNumVehExisting
FROM object_data
WHERE Instance = sInstance
AND Classname != '-'#exclude dummys
AND Classname != 'Hedgehog_DZ'#exclude hedgehog
AND Classname != 'Wire_cat1'#exclude wirecat
AND Classname != 'Sandbag1_DZ'#exclude Sanbag
AND Classname != 'TrapBear'#exclude trap
AND Classname != 'TentStorage';#exclude TentStorage
#update number of same class already spawned
SELECT COUNT(*)
INTO iNumClassExisting
FROM object_data
WHERE Instance = sInstance
AND Classname = @rsClassname;
END IF;
END IF;
SET iTimeout = iTimeout + 1; #raise timeout counter
IF (iTimeout >= iTimeoutMax) THEN
SET iNumVehExisting = iVehSpawnMax;
END IF;
END WHILE;
SET i = i + 1;
END
You said you've checked your database and there are vehicles in the object_data table? If that's the case, then they're spawning, but you just can't see them. Do you have any extra scripts installed, or are you still using the default mission file that came with Pwnoz0r's server pack?
You should have removed any unworking server setups before trying to install a new one, if for no other reason than to save disk space and to reduce any potential confusion from multiple server installs.
I don't have any experience with the SARGE AI Framework, so I can't say if it would be able to cause issues with spawned vehicles. Have you tried it without the mod installed?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.