SA-MP Forums Archive
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: Vehicle Health (/showthread.php?tid=309132)



Vehicle Health - DonWade - 06.01.2012

I have been searching for this thing , but with no luck ...
I want to give player money for finishing one job mission , but ammount of money will depend on vehicle health..

I tried with this , but it gives me one warning : warning 213: tag mismatch

here's the code:

Код:
 new Float:Vhealth;
          new vehicleid;
          vehicleid = GetPlayerVehicleID(playerid);
          GetVehicleHealth(vehicleid, Vhealth);


          GivePlayerMoney(playerid,Vhealth*100);



Re: Vehicle Health - DonWade - 06.01.2012

Sorry for Bump*** but rly need this


Re: Vehicle Health - Vince - 06.01.2012

Float*Integer = Float. GivePlayerMoney expects an integer. Hence tag mismatch. Hint: Round the float. If you are not capable of finding yourself a function that does this, then I feel sorry for you.

@Beneath me: WELL THANK YOU FOR SCREWING IT UP! Give them a finger and they take your whole hand! They must learn once and for all to go and SEARCH for things themselves! For f*cks sake.


Re: Vehicle Health - CyNiC - 06.01.2012

Why not say the function name? Is floatround

pawn Код:
GivePlayerMoney(playerid,floatround(Vhealth)*100);



Re: Vehicle Health - DonWade - 06.01.2012

Quote:
Originally Posted by Vince
Посмотреть сообщение
Float*Integer = Float. GivePlayerMoney expects an integer. Hence tag mismatch. Hint: Round the float. If you are not capable of finding yourself a function that does this, then I feel sorry for you.

@Beneath me: WELL THANK YOU FOR SCREWING IT UP! Give them a finger and they take your whole hand! They must learn once and for all to go and SEARCH for things themselves! For f*cks sake.
i searched for this and guess what , nothing usefull , anyway thanks


Re: Vehicle Health - DonWade - 06.01.2012

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
Why not say the function name? Is floatround

pawn Код:
GivePlayerMoney(playerid,floatround(Vhealth)*100);
Thanks , ill try with this