mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
start of work moving commands to lua
This commit is contained in:
23
data/scripts/commands/gm/reloadzone.lua
Normal file
23
data/scripts/commands/gm/reloadzone.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "s",
|
||||
description = "reloads <zone>",
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, zone)
|
||||
if not zone or tonumber(zone) == 0 then
|
||||
printf("%s is not a valid zone!", zone);
|
||||
return;
|
||||
end;
|
||||
|
||||
zone = tonumber(zone);
|
||||
|
||||
if player then
|
||||
local messageID = MSG_TYPE_SYSTEM_ERROR;
|
||||
player:SendMessage(messageID, "[reloadzones] ", string.format("Reloading zone: %u", zone));
|
||||
end;
|
||||
|
||||
GetWorldManager():ReloadZone(zone);
|
||||
end;
|
Reference in New Issue
Block a user