SA-MP Forums Archive
Saving vehicle health - 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: Saving vehicle health (/showthread.php?tid=410212)



Saving vehicle health - iArko - 24.01.2013

How would I save the health/damage of a vehicle?


Re: Saving vehicle health - Roach_ - 24.01.2013

I don't understand, where do you want to save it.. or why ?


Re: Saving vehicle health - iArko - 24.01.2013

Quote:
Originally Posted by Roach_
Посмотреть сообщение
I don't understand, where do you want to save it.. or why ?
Like when the player disconnects it says the vehicle damage of their vehicle and when the player reconnects the vehicle health is set to what it was when the said player disconnected. And the reason why is because I'm editing a rp script and I don't want the player to disconnect to avoid paying for something to fix their vehicle.


Re: Saving vehicle health - Roach_ - 24.01.2013

You talk about personal vehicles?


Re: Saving vehicle health - iArko - 24.01.2013

Quote:
Originally Posted by Roach_
Посмотреть сообщение
You talk about personal vehicles?
Yes but thats not the point, The point is that I want to now how to get the vehicles health and then save it.


Re: Saving vehicle health - Roach_ - 24.01.2013

Depends on what Save System do you have..
The function is:
pawn Код:
GetVehicleHealth(vehicleid, &Float:health);



Re: Saving vehicle health - iArko - 24.01.2013

Quote:
Originally Posted by Roach_
Посмотреть сообщение
Depends on what Save System do you have..
The function is:
pawn Код:
GetVehicleHealth(vehicleid, &Float:health);
Thanks for the help mate.