Page 1
Description
Adds argument to be used with the command.
Aguments
- string argument_name
Returns
Example
local kick_command = sam.Command.get("kick")
kick_command:add_arg("text", {
-- optional field is used by core to know if this command is optional or not
optional = true,
-- text argument has these options:
-- hint : string : defaut = "text"
-- check : bool function(input: string, player: Player)
hint = "meow meoew hint",
check = function(ply_input, ply)
return ply_input == "true"
end
})
Last updated
Was this helpful?