19.11.2014, 16:42
Script: My own
Problem: I'm trying to make Phone system. I almost succeeded, i have only one problem.
When i'm a caller or called player (what ever) hangup the Call, next time when player join (if i hanguped the call, than other player when join and reverse), Server send him a lot of messages ("%s nema dovoljno kredita da nastavi razgovor! / %s dont have enough credit to continue conversation")
So, i have the question for you, how can i make a timer or whatever to check when player talking if he have enough credit to continue talking ? (EDIT: this is only when i do /rcon gmx)
Now, i have one timer every sec, but i dont work with it... I must make something else, to do same function
Sorry for my bad English, i think you understand what's the problem
Problem: I'm trying to make Phone system. I almost succeeded, i have only one problem.
When i'm a caller or called player (what ever) hangup the Call, next time when player join (if i hanguped the call, than other player when join and reverse), Server send him a lot of messages ("%s nema dovoljno kredita da nastavi razgovor! / %s dont have enough credit to continue conversation")
So, i have the question for you, how can i make a timer or whatever to check when player talking if he have enough credit to continue talking ? (EDIT: this is only when i do /rcon gmx)
Now, i have one timer every sec, but i dont work with it... I must make something else, to do same function
Код:
task TaxiMeter[1000]() { new sendername[MAX_PLAYER_NAME], str[256]; for(new i = 0; i < MAX_PLAYERS; i++) { if(InCall[i] != 999 && iCall[i] != 999) { if(PlayerInfo[i][pMobileCredit] == 0) { iCall[i] = 999; InCall[i] = 999; InCall[CalledPlayer[i]] = 999; SCM(i, BOJA_CRVENA, "Nemate dovoljno kredita da nastavite razgovor!"); GetPlayerName(i, sendername, sizeof(sendername)); format(str, sizeof(str), "%s nema dovoljno kredita da nastavi razgovor!", sendername); SCM(CalledPlayer[i], BOJA_CRVENA, str); Caller[CalledPlayer[i]] = 999; CalledPlayer[i] = 999; } else { PlayerInfo[i][pMobileCredit] -= 1; savePlayer(i); } } } }