lower the value.
#1

Hello,
I wanted to ask that how can we lower down the value of text draws?Let me explain,
like it is FUEL: 100,it lowers down by 10 seconds then and comes to 99,You understand right,if yes please help.
ThAnKs!
Reply
#2

I dont understand. Do you mean so every 10 seconds you drive a car, that it goes down by 1% fuel? If so..

Use a SetTimerEx for a timer which runs when your inside a vehicle (with fuel) and every 10 seconds it takes 1 from the fuel... or if they player it out of a vehicle, it stops the timer as you left the vehicle..


if this helped... +Rep?
Reply
#3

Quote:
Originally Posted by DarrenReeder
Посмотреть сообщение
I dont understand. Do you mean so every 10 seconds you drive a car, that it goes down by 1% fuel? If so..

Use a SetTimerEx for a timer which runs when your inside a vehicle (with fuel) and every 10 seconds it takes 1 from the fuel... or if they player it out of a vehicle, it stops the timer as you left the vehicle..


if this helped... +Rep?
You got me wrong,I want to ask that how can we make a thing with a textdraw that if their is a textdraw like fuel: 100,How to lower this "100" to 99 and so on,In short how to lower the value that is 90 to the lower value.Please help me with small codes and if possible please explain them.
ThAnKs!
Reply
#4

bump please?
Reply
#5

OnPlayerStateChange, check
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
add there,
pawn Код:
fueltimer[playerid] = SetTimerEx("LessFuel",10000,true,"i",vehicleid);
the in your "lessfuel" callback add
pawn Код:
Fuel[vehicleid] = --;
this should take away 1 fuel
also, don't forget to add
pawn Код:
new fueltimer[MAX_PLAYERS];
.
then, next up, search in OnPlayerStateChange, to
pawn Код:
if(newstate == PLAYER_STATE_ONFOOT)
add there,
pawn Код:
KillTimer(FuelTimer[playerid]);
don't forget, don't bump if the last reply was less than 24 hours ago!
Reply
#6

woooo Thanks bro.Cooooooooooooool.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)