how can I do this in LUA?
Code:ConsoleSystem.SendClientCommand(player.net.connection, " 7 +slot7;inventory.toggle");
Solved Binding a key with Lua?
Discussion in 'Rust Development' started by isuelt, Feb 19, 2016.
-
Wulf Community Admin
There's no way to send multiple commands are one or whatever 7 +slot7 is. You can however send a console command like below:
Code:rust.RunClientCommand(player, "inventory.toggle")
-
I know I've seen some LUA code that binded a specific key - but maybe not the multiple commands.
-
Wulf Community Admin
Code:rust.RunClientCommand(player, "bind H inventory.toggle")
-
Code:
C# PLZ!
-
Wulf Community Admin
Code:rust.RunClientCommand(player,"bind H inventory.toggle");
-
Code:
if (BasePlayer.activePlayerList.Count > 0) { foreach (BasePlayer player in BasePlayer.activePlayerList) { startupList.Add(player.userID); rust.RunClientCommand(player,"bind Q kill"); //player.Command("bind q \"kill"); //ConsoleSystem.SendClientCommand(player.net.connection, "bind q \"kill\""); } }
-
Wulf Community Admin
-
{
foreach (BasePlayer player in BasePlayer.activePlayerList)
{
startupList.Add(player.userID);
rust.RunClientCommand(player, "bind Q \"say test"\"");
}
}
is not working...
api so hard.. -
Wulf Community Admin
-
why my button is not working ..T^T -
ConsoleSystem.SendClientCommand(player.net.connection, "bind q \"LustyMap map\"");
I think you need to call the LustyMap via LustyMap?.Call(args) - You replace args with something else: Here is a example of calling a kit:
Kits?.Call("GiveKit", player, kitname);