help with gas.
#1

Hi all,I need some help.I want to do if player run with vehicle 1 km,he lost 1 gas,but in my script when player reach 1 km he lost 1 gas every second(this is because i set timer for 1 second).But i wanna to do 1 km 1 gas.More 1 km and again 1 gas less.Again 1 km more and 1 gas less here is my script:

if(vehicleDB[vehicleid][prav]/10000 >= 1)//here is when player run with vehicle 1 km
{
vehicleDB[vehicleid][gas] --;//he lost 1 gas

Thanks.
Reply
#2

Any help?
Reply
#3

Save the distance in an integer/float every second, and check if(distance+value >= distance+1)
Reply
#4

I'am green in scripts,and I'am nothing understand maybe you can give me script?
Reply
#5

Please show me how it should look.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)