13.08.2014, 14:57
Quote:
Be very careful with that code, specifically this part:
Code:
format(string, sizeof(string), "SUBMARINE: Torpedo away! Remaining torpedos: %d/4", Submarine[SubID[playerid]][Torpedos]); CanShoot[playerid] = 0; foreach(Player, i) { if(IsPlayerInRangeOfPoint(i, 20, X, Y, Z)) { SendClientMessage(i, -1, string), string = "\0"; } } Also I suggest detecting stuff like that under OnPlayerUpdate with static variables, simply because it gets called more frequently. |
It's the same as running a 1 second ( or 500 ms ) timer which repeats itself..
Still need help though.