mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 20:52:54 +00:00
chat_commands 1.1.9
[Refactor] Fix wrong type error during help message comparison. Change default strings to array of one string
This commit is contained in:
parent
a51165558c
commit
59bfdc19fe
@ -37,11 +37,11 @@ InitCommands()
|
|||||||
CreateCommand(level.commands_servers_ports, "map", "function", ::ChangeMapCommand, ["Example: " + level.commands_prefix + "map mp_dome"]);
|
CreateCommand(level.commands_servers_ports, "map", "function", ::ChangeMapCommand, ["Example: " + level.commands_prefix + "map mp_dome"]);
|
||||||
CreateCommand(level.commands_servers_ports, "mode", "function", ::ChangeModeCommand, ["Example: " + level.commands_prefix + "mode FFA_default"]);
|
CreateCommand(level.commands_servers_ports, "mode", "function", ::ChangeModeCommand, ["Example: " + level.commands_prefix + "mode FFA_default"]);
|
||||||
CreateCommand(level.commands_servers_ports, "mapmode", "function", ::ChangeMapAndModeCommand, ["Example: " + level.commands_prefix + "mapmode mp_seatown TDM_default"]);
|
CreateCommand(level.commands_servers_ports, "mapmode", "function", ::ChangeMapAndModeCommand, ["Example: " + level.commands_prefix + "mapmode mp_seatown TDM_default"]);
|
||||||
CreateCommand(level.commands_servers_ports, "changeteam", "function", ::ChangeTeamCommand, "default_help_one_player");
|
CreateCommand(level.commands_servers_ports, "changeteam", "function", ::ChangeTeamCommand, ["default_help_one_player"]);
|
||||||
CreateCommand(level.commands_servers_ports, "teleport", "function", ::TeleportCommand, "default_help_two_players");
|
CreateCommand(level.commands_servers_ports, "teleport", "function", ::TeleportCommand, ["default_help_two_players"]);
|
||||||
CreateCommand(level.commands_servers_ports, "norecoil", "function", ::NoRecoilCommand, "default_help_one_player");
|
CreateCommand(level.commands_servers_ports, "norecoil", "function", ::NoRecoilCommand, ["default_help_one_player"]);
|
||||||
CreateCommand(level.commands_servers_ports, "invisible", "function", ::InvisibleCommand, "default_help_one_player");
|
CreateCommand(level.commands_servers_ports, "invisible", "function", ::InvisibleCommand, ["default_help_one_player"]);
|
||||||
CreateCommand(level.commands_servers_ports, "wallhack", "function", ::WallhackCommand, "default_help_one_player");
|
CreateCommand(level.commands_servers_ports, "wallhack", "function", ::WallhackCommand, ["default_help_one_player"]);
|
||||||
|
|
||||||
// Specific server(s) text commands
|
// Specific server(s) text commands
|
||||||
CreateCommand(["27016", "27017"], "rules", "text", ["Do not camp", "Do not spawnkill", "Do not disrespect other players"]);
|
CreateCommand(["27016", "27017"], "rules", "text", ["Do not camp", "Do not spawnkill", "Do not disrespect other players"]);
|
||||||
@ -65,12 +65,13 @@ CreateCommand(serverPorts, commandName, commandType, commandValue, commandHelp)
|
|||||||
if (IsDefined(commandHelp))
|
if (IsDefined(commandHelp))
|
||||||
{
|
{
|
||||||
commandHelpMessage = commandHelp;
|
commandHelpMessage = commandHelp;
|
||||||
|
commandHelpString = commandHelp[0];
|
||||||
|
|
||||||
if (commandHelp == "default_help_one_player")
|
if (commandHelpString == "default_help_one_player")
|
||||||
{
|
{
|
||||||
commandHelpMessage = ["Example: " + level.commands_prefix + commandName + " me", "Example: " + level.commands_prefix + commandName + " Resxt"];
|
commandHelpMessage = ["Example: " + level.commands_prefix + commandName + " me", "Example: " + level.commands_prefix + commandName + " Resxt"];
|
||||||
}
|
}
|
||||||
else if (commandHelp == "default_help_two_players")
|
else if (commandHelpString == "default_help_two_players")
|
||||||
{
|
{
|
||||||
commandHelpMessage = ["Example: " + level.commands_prefix + commandName + " me Resxt", "Example: " + level.commands_prefix + commandName + " Resxt me", "Example: " + level.commands_prefix + commandName + " Resxt Eldor"];
|
commandHelpMessage = ["Example: " + level.commands_prefix + commandName + " me Resxt", "Example: " + level.commands_prefix + commandName + " Resxt me", "Example: " + level.commands_prefix + commandName + " Resxt Eldor"];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user