2025-06-22 11:17:11 -04:00
|
|
|
required_rank = GM_RANK_DEBUG
|
2025-06-27 23:01:00 -04:00
|
|
|
command_sender = "[unlock] "
|
2025-06-22 11:17:11 -04:00
|
|
|
|
|
|
|
function onCommand(args, player)
|
|
|
|
local parts = split(args)
|
2025-06-25 15:21:09 -04:00
|
|
|
local argc = #parts
|
2025-06-25 16:52:37 -04:00
|
|
|
|
2025-06-22 11:17:11 -04:00
|
|
|
local usage = "\nThis command teaches the user an action, emote, etc.\nUsage: !useaction <id/all>"
|
|
|
|
|
|
|
|
if argc < 1 then
|
2025-06-25 16:52:37 -04:00
|
|
|
printf(player, "This command requires 1 parameter."..usage)
|
2025-06-22 11:17:11 -04:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if parts[1] == "all" then
|
2025-06-27 23:40:19 -04:00
|
|
|
for i = 0, 511, 1 do
|
2025-06-27 23:01:00 -04:00
|
|
|
player:unlock(i)
|
2025-06-22 11:17:11 -04:00
|
|
|
end
|
2025-06-25 16:52:37 -04:00
|
|
|
printf(player, "Everything is unlocked!", id)
|
2025-06-22 11:17:11 -04:00
|
|
|
else
|
|
|
|
local id = tonumber(parts[1])
|
|
|
|
|
|
|
|
if not id then
|
2025-06-27 23:01:00 -04:00
|
|
|
printf(player, "Error parsing unlock id! Make sure the id is an integer."..usage)
|
2025-06-22 11:17:11 -04:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2025-06-27 23:01:00 -04:00
|
|
|
player:unlock(id)
|
|
|
|
printf(player, "%s unlocked!", id)
|
2025-06-22 11:17:11 -04:00
|
|
|
end
|
|
|
|
end
|