SA-MP Forums Archive
Sell Vehicle with less money on damage? - 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: Sell Vehicle with less money on damage? (/showthread.php?tid=344372)



Sell Vehicle with less money on damage? - Admigo - 20.05.2012

Heey all,

I used a part of a script for sell vehicles for lees money if they are damaged.
But its not working because i sell the vehicle for the full price while my vehicle is damaged.
Код:
new Float:VHealth;
GetVehicleHealth(vehicleid,VHealth);
print("d");
GivePlayerMoney(playerid,floatround(VehicleInfo[modelid-400][VehiclePrice]*(VHealth/1000)));
print("e");
format(str,sizeof(str),"* You sold %s for $%d *",VehicleInfo[modelid-400][VehicleName],floatround(VehicleInfo[modelid-400][VehiclePrice]*(VHealth/1000)));
How can i fix this?

Thanks Admigo


Re: Sell Vehicle with less money on damage? - Admigo - 20.05.2012

Fixed! Thread Closed!