Taxi Fare Meter
#2

Well, here it is:

pawn Код:
playerVariables[ playerid ][ pMyFare ] += playerVariables[ playerid ][ pTaxiFare ]; // same thing


// well you can do this, I am not sure if this is the MOST efficient way to do but here it is:

// if you want to check 60 or 60*2 or 60*3 and so on you may do this

new pSeconds[ playerid ],
    pMinutes[ playerid ]; // this is not really needed but yea O_O
   

public YourTimer( playerid )
{
    pSeconds[ playerid ]++; // increments (adds by one)
   
    switch( pSeconds[ playerid ] )
    {
        case 60: // 1 minute
        {
            pSeconds[ playerid ] = 0; // making it zero for the next minute
           
            pMinutes[ playerid ]++; // counts how many minutes it has been (not really needed or maybe? just incase)
           
            // here you can now do the rest of your code according to each minute O_O
        }
    }
   
}
This was just an example, you may replace the variables with your own. If this is not what you mean, please explain

Regards FalconX
Reply


Messages In This Thread
Taxi Fare Meter - by Ballu Miaa - 09.04.2013, 02:53
Re: Taxi Fare Meter - by FalconX - 09.04.2013, 03:43
Re: Taxi Fare Meter - by Ballu Miaa - 09.04.2013, 04:15
Re: Taxi Fare Meter - by FalconX - 09.04.2013, 04:27
Re: Taxi Fare Meter - by Ballu Miaa - 09.04.2013, 04:33
Re: Taxi Fare Meter - by FalconX - 10.04.2013, 19:58

Forum Jump:


Users browsing this thread: 3 Guest(s)