local ACCESS_GAMEMASTER = 5
local p = string.explode(param, ',')
function onSay(cid, words, param, channel)
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerAccess(cid) > ACCESS_GAMEMASTER then
local speed = tonumber(p[2])
if speed then
doChangeSpeed(pid, speed)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have changed" .. (pid == cid and " your" or getCreatureName(p[1])) .. " " .. pid ~= cid and "'s" or "" .. " speed to " .. speed .. ".")
else
return doPlayerSendCancel(cid, "Sorry, the new speed must be numerical.")
end
else
return doPlayerSendCancel(cid, "Sorry, not possible.")
end
end
return true
end