OsRegionRestart

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (some syntax modification (may be major or minor))
Line 28: Line 28:
 
     }
 
     }
 
}</source>
 
}</source>
This would start a region restart after 60 seconds.
+
This would start a region restart after 120 seconds (two minutes).
|description=
+
|description=Restarts a region after a specified timeout.
 
|
 
|
 
}}
 
}}

Revision as of 11:11, 30 July 2011

integer osRegionRestart(float seconds)
Restarts a region after a specified timeout.
Threat Level High
Permissions No permissions specified
Delay No function delay specified
Example(s)
key owner;
integer time = 120; // Delay of restart in seconds
default
{
    state_entry()
    {
        llSetText("Region Restart\nosRegionRestart", <1.0,1.0,1.0>,1.0);
 
    }
    touch (integer total_number)
    {
        owner = llDetectedOwner(0);
        key toucher = llDetectedKey(0);
        if (toucher == owner)
        {
            osRegionRestart(time);
            string name = llKey2Name(toucher);
            llSay (0,"Region Restart requested by " + name + " the sim will restart in " + ((string)time) + " seconds");
 
        }
        else
        {
             llSay(0,"You are not the owner");
        }
    }
}

This would start a region restart after 120 seconds (two minutes).

Personal tools
General
About This Wiki