19.05.2015, 18:23
What do you mean by time freeze?
As in the server freezes for some time? or do you mean you made a textdraw with server time and it stopped updating?
if its the server freezing then you are calling an update function which is hanging for 11 seconds causing any other server actions/processes to wait. Remember SA-MP is single threaded, meaning if you had:
Function Two will never get called as function one will never complete its process. So you need to check your script for endless or wasted for loops.
- Think clearly about what your for loops are being used for.
- Also if you can I would suggest using something other then 'strcmp' for commands, try (ZCMD, DCMD, etc)
As in the server freezes for some time? or do you mean you made a textdraw with server time and it stopped updating?
if its the server freezing then you are calling an update function which is hanging for 11 seconds causing any other server actions/processes to wait. Remember SA-MP is single threaded, meaning if you had:
Код:
public OnGameModeInit() { FunctionOne(); FunctionTwo(); return 1; } public FunctionOne() { for(;;) { print("Never Ending Loop"); } return 1; } public FunctionTwo() { print("Function Two Called"); return 1; }
- Think clearly about what your for loops are being used for.
- Also if you can I would suggest using something other then 'strcmp' for commands, try (ZCMD, DCMD, etc)