Chuyển tới nội dung chính

SetModeRestartTime

cảnh báo

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Sets the delay between loading main scripts, in seconds.

Parameters

NameDescription
Float:secondsSeconds to restart.

Return Values

1 - Function executed successfully.

0 - Function failed to execute. This means that the specified seconds should not be less than 1.

Examples

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/restart", true))
{
if (!IsPlayerAdmin(playerid))
{
return 1;
}

SetModeRestartTime(5.0);
SendClientMessage(playerid, -1, "[SERVER]: The server will restart in 5 seconds.");
return 1;
}
return 0;
}

Notes

cảnh báo

The seconds parameter is a float.