ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. debugSleep

Function

debugSleep

ServerUtilitiesIdentical to MTA:SA

Freezes the whole server for the given time (0-5000 ms). Only for testing behaviour under lag - the server does nothing during that time.

Syntax

bool debugSleep(int sleep)

Arguments

sleepint
Time in ms (0-5000).

Returns

true after waiting, false when unsupported.

Example

addCommandHandler("lag", function(player)
    if getDevelopmentMode() then debugSleep(500) end
end)

See also