Stapo
Modding Veteran
As you may not know, but pwnoz0rs current build has got a small problem.
that problem is that when you run the server and it runs the vehicle spawn script, it gives vehicles the wrong hitpoints as in a UH1H-DZ would be given the hitpoints of a ATV. but the reason its doing that is because something is not right in Pspawn... BUT my co-mod developer Alby figured it out and fixed it and im releasing the fix to everyone and also to be a smartass to pwnoz0r..
So what you have to do is load up navicat (server must be running) and go to functions, you should then see a function called Pspawn. right click on it and go to 'Design Function', once in the designer delete all the code in Pspawn and replace it with this:
then save it, clear your 'object_data' table and restart the server and check the 'object_data' and you should see all the vehicles with their correct hitpoints.
NOTE TO PWNOZOR: Include this in your next Github commit
that problem is that when you run the server and it runs the vehicle spawn script, it gives vehicles the wrong hitpoints as in a UH1H-DZ would be given the hitpoints of a ATV. but the reason its doing that is because something is not right in Pspawn... BUT my co-mod developer Alby figured it out and fixed it and im releasing the fix to everyone and also to be a smartass to pwnoz0r..
So what you have to do is load up navicat (server must be running) and go to functions, you should then see a function called Pspawn. right click on it and go to 'Design Function', once in the designer delete all the code in Pspawn and replace it with this:
Code:
BEGIN
DECLARE bSpawned TINYINT(1) DEFAULT 0;
DECLARE iLID INT DEFAULT 0;
WHILE (bSpawned = 0) DO
SET iLID = LAST_INSERT_ID();
INSERT INTO object_data (ObjectUID, Instance, Classname, Damage, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Datestamp)
SELECT ot.ObjectUID, '1', ot.Classname, ot.Damage, '0', ot.Worldspace, '[]', ot.Hitpoints, '0.01', SYSDATE()
FROM (SELECT oc.Classname, oc.Chance, oc.MaxNum, oc.Damage, oc.Hitpoints, os.ObjectUID, os.Worldspace
FROM object_classes AS oc
INNER JOIN object_spawns AS os
ON oc.Classname = os.Classname
ORDER BY RAND()) AS ot
WHERE NOT EXISTS (SELECT od.ObjectUID
FROM object_data AS od
WHERE ot.ObjectUID = od.ObjectUID)
AND fGetClassCount(ot.Classname) < ot.MaxNum
AND fGetSpawnFromChance(ot.Chance) = 1
LIMIT 1;
IF (LAST_INSERT_ID() <> iLID) THEN
SET bSpawned = 1;
END IF;
END WHILE;
END
then save it, clear your 'object_data' table and restart the server and check the 'object_data' and you should see all the vehicles with their correct hitpoints.
NOTE TO PWNOZOR: Include this in your next Github commit