Vehicle Health
#1

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);
Reply
#2

Sorry for Bump*** but rly need this
Reply
#3

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.
Reply
#4

Why not say the function name? Is floatround

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

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
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)