2013-02-01 14:55:42 -05:00
|
|
|
function HandleRegenerateChunkCommand(Split, Player)
|
|
|
|
if ((#Split == 2) or (#Split > 3)) then
|
|
|
|
Player:SendMessage( cChatColor.Green .. "Usage: '/regeneratechunk' or '/regeneratechunk [X] [Z]'");
|
|
|
|
return true;
|
2012-04-11 08:16:13 -04:00
|
|
|
end
|
|
|
|
|
2013-02-01 14:55:42 -05:00
|
|
|
local X = Player:GetChunkX();
|
|
|
|
local Z = Player:GetChunkZ();
|
2012-04-11 08:16:13 -04:00
|
|
|
|
2013-02-01 14:55:42 -05:00
|
|
|
if (#Split == 3) then
|
|
|
|
X = Split[2];
|
|
|
|
Z = Split[3];
|
2012-04-11 08:16:13 -04:00
|
|
|
end
|
|
|
|
|
2013-02-01 14:55:42 -05:00
|
|
|
Player:SendMessage(cChatColor.Green .. "Regenerating chunk ["..X..", "..Z.."]");
|
|
|
|
Player:GetWorld():RegenerateChunk(X, Z);
|
|
|
|
return true;
|
2012-04-11 08:16:13 -04:00
|
|
|
end
|