09.04.2013, 02:53
Dear Members,
I've been working for some new clients of mine. They have a Roleplay server which i am developing currently. I need to code a Taxi Fare Meters but am having certain issues with it. The Fare meter will run for 60 seconds each.
Every minute it will increase
Lets Consider an example:
A person hops into the taxi. The Fare meter will start. The fare is 6 USD. So every minute his fare is incremented to 6 USD.
What am having issues is with the callback to be called with SetTimerEx. if i call the Callback each second and increment an integer every time it is called. Then how can i check that this integer is 60 or its 60*2 or something? I need a simple if clause to check every time. I dont want to mess the codes with 100 if clauses.
If you can help it will be highly appreciated. If you need to know more about it. Please post.
Regards,
Ballu Miaa
I've been working for some new clients of mine. They have a Roleplay server which i am developing currently. I need to code a Taxi Fare Meters but am having certain issues with it. The Fare meter will run for 60 seconds each.
Every minute it will increase
pawn Код:
playerVariables[playerid][pMyFare] = playerVariables[playerid][pMyFare] + playerVariables[playerid][pTaxiFare]
A person hops into the taxi. The Fare meter will start. The fare is 6 USD. So every minute his fare is incremented to 6 USD.
What am having issues is with the callback to be called with SetTimerEx. if i call the Callback each second and increment an integer every time it is called. Then how can i check that this integer is 60 or its 60*2 or something? I need a simple if clause to check every time. I dont want to mess the codes with 100 if clauses.
If you can help it will be highly appreciated. If you need to know more about it. Please post.
Regards,
Ballu Miaa