mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 14:04:41 +02:00
Updated Map Server namespace. Moved all other data folders (www and sql) to data folder. Renamed boot name to Project Meteor.
This commit is contained in:
parent
18ef69f3d1
commit
91549bff7a
1823 changed files with 102704 additions and 901 deletions
32
Data/scripts/commands/gm/speed.lua
Normal file
32
Data/scripts/commands/gm/speed.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Set movement speed for player. Enter no value to reset to default.
|
||||
!speed <run> |
|
||||
!speed <stop> <walk> <run> |
|
||||
]]
|
||||
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, stop, walk, run)
|
||||
local s = tonumber(stop) or 0;
|
||||
local w = tonumber(walk) or 2;
|
||||
local r = tonumber(run) or 5;
|
||||
|
||||
if argc == 1 and tonumber(stop) then
|
||||
w = (tonumber(stop) / 2);
|
||||
player:ChangeSpeed(0, w, s, s);
|
||||
player:SendMessage(MESSAGE_TYPE_SYSTEM_ERROR, "", string.format("[speed] Speed set to 0/%s/%s", w,s));
|
||||
elseif argc == 3 then
|
||||
player:ChangeSpeed(s, w, r, r);
|
||||
player:SendMessage(MESSAGE_TYPE_SYSTEM_ERROR, "", string.format("[speed] Speed set to %s/%s/%s", s,w,r));
|
||||
else
|
||||
player:ChangeSpeed(0, 2, 5, 5);
|
||||
player:SendMessage(MESSAGE_TYPE_SYSTEM_ERROR, "", "[speed] Speed values set to default");
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue