SA-MP Forums Archive
Record/Playback NPC - infinite HP vehicle on fire - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Record/Playback NPC - infinite HP vehicle on fire (/showthread.php?tid=361006)



Record/Playback NPC - infinite HP vehicle on fire - Benjo - 19.07.2012

Hello!

In my stunting server, I use the infinite health float (Float:0x7F800000) for all of the vehicles. This has worked fine, until I recently implemented a new feature...

The new command /record can now be used to make and save a recording. /replay plays it back. The problem is that the vehicle sets on fire at the start of playback, and is destroyed about 15 seconds later.

I have set a timer to RepairVehicle and SetVehicleHealth to Float:0x7F800000 every 500ms to experiment and try to cure the problem. Debug messages show that these commands are executed, but the vehicle stays on fire and explodes nonetheless. So I'm rather stumped at the moment, and am hoping that somebody has some advice for me! Are there any known issues recording players in vehicles with health set at Float:0x7F800000? Have I missed something blindingly obvious?

Thanks in advance for any feedback.


Re: Record/Playback NPC - infinite HP vehicle on fire - Benjo - 19.07.2012

I'm still no further with figuring this one out. I've tried adding a command to RepairVehicle and SetVehicleHealth to Float:0x7F800000 to all vehicles on the server, which has made no difference. I'm starting to think it's my method of giving vehicles infinite health. Could anybody recommend a different method?