tag mismach ?
#1

I want to set the fuel price to $1 per liter so when you offer fuel to someone it gives him 100 in the tank so if he had like 60, he will pay 40

But money = 100 - Vehicle3[vehicle][Fuel]; gives me a tag mismach, any ideas?

pawn Код:
new playa;
playa = ReturnUser(tmp);

new money;
new vehicle = GetPlayerVehicleID(playa);
if(IsPlayerInVehicle(playa, vehicle))
{
    money = 100 - Vehicle3[vehicle][Fuel];
}
Reply
#2

Your fuel variable is probably a float, which is basically a number which is a number that includes decimal points.

You'll need to round your float variable to the nearest whole number.

pawn Код:
money = 100 - floatround(Vehicle3[vehicle][Fuel], floatround_round);
Reply
#3

thx, it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)