Fuel Problem
#1

pawn Код:
for(new i=0;i<MAX_PLAYERS;i++) {
        if (isrefuelling[i]) continue;
        new vid = GetPlayerVehicleID(i);
        if (GetPlayerVehicleSeat(i) == 0) {
            fuel[vid] = fuel[vid] - 2;
            if (fuel[vid]<1)
            {
                fuel[vid] = 0;
                //RemovePlayerFromVehicle(i);
                GameTextForPlayer(i,"~r~Out of ~w~fuel~r~!",5000,4);
            }
        }
        new string[128];format(string,sizeof string,"Fuel:    %i",fuel[vid] /4);
        TextDrawSetString(td_fuel[i],string);
I want the fuel decrease every 10 seconds at least, How to do that?
Reply
#2

A help?
Reply
#3

Quote:
Originally Posted by Teemo
Посмотреть сообщение
A help?
Captain Teemo on Duty! Oh, sorry.

Off-topic:http://*********/U996nO8zkZs

I just saw your name and thought it was a coincidence, until I saw your pic.
Reply
#4

lol...Nice video and thanks but i hope you help me with that bug.
Reply
#5

You'd need a timer that runs every 10 seconds, and by the looks of your function, it'd be a global timer.

https://sampwiki.blast.hk/wiki/SetTimer
Reply
#6

Well you're right! but if i made a timer, it will effect on the speedometer, Because they are together and the speedometer will show me the last speed which i was on every 10 seconds...I am right?
Reply
#7

yep, you can separate them though
Reply
#8

Great idea, Thank you for trying to help
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)