Question
#1

hey guys.
Well im asking about car heal
is there a way to define it like 100% and not 1000?
i am already doing but i have it with 1000% and not 100% any one give me a suggest
Reply
#2

Multiple it by 0.1.

pawn Код:
new Float:hp;
GetVehicleHealth(vehicleid,hp);
new Float:percent;
percent = hp*0.1;
printf("Vehicle Health: %%.1f",percent);
1000 becomes %100.
752 becomes %75.2 and so on.
Reply
#3

Thanks man.
Reply
#4

Are you trying to heal the specified player when they type pay? Because if you are, I am not seeing anywhere in the response code where you are setting the player's health, however have you tried debugging it to spot where the error is occuring? Put a print("something to tell the difference from line to another here"); between every response line, print the formats, everything. Then see which print(); doesn't show up in the console and inform me about it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)