note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
SetModeRestartTime
warning
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
Name | Description |
---|---|
Float:seconds | Seconds 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
warning
The seconds
parameter is a float.
Related Functions
- GetModeRestartTime: Gets the delay between loading main scripts, in seconds.
- GameModeExit: Ends the current gamemode.