24.09.2016, 16:09
Hi. I have timer:
And code:
This code must add Earning to Profit. But.... He adding 2x Earning. For example, if Earning = 15 , code adding in 1 minute 30... Why?
Code:
SetTimer("Bussines", 60000, true);
Code:
f_public: Bussines(playerid) { new String[128]; for(new Bussines; Bussines < MAX_BUSSINES; Bussines ++) { if(Bussinesinf[Bussines][Buyed]) { sscanf(Bussinesinf[Bussines][Owner], "r", ownerid); if(ownerid != INVALID_PLAYER_ID) { Bussinesinf[Bussines][Profit] += Bussinesinf[Bussines][Earning]; format(String, sizeof(String), "UPDATE `bussines` SET Profit = '%d' WHERE ID = '%d'", Bussinesinf[Bussines][Profit], Bussines; mysql_query(String); } } } }