Hello,
I'm trying to make my plugin execute a command depending condition.
For example:
I'm trying to make my plugin execute a command depending condition.
For example:
object OnPlayerDeath(BasePlayer player, HitInfo info)
{
ConVar.Env.time = 12;
return null;
}But this is only working for convar that already exist in the game. I'm looking for a way to execute any command.
For example:
object OnPlayerDeath(BasePlayer player, HitInfo info)
{
List<string> mylist2 = new List<string>(new string[] { "inventory.give wood {0} 1000", "myCustomCommand", "element3" });
foreach (var item in mylist2)
{
string cmd = string.Format(item, player);
executeCmd(cmd);
}
return null;
}Can you help me?