Category - OxideMod

2017-01-21 02:21:17    149    0    0
  1. player.ChatMessage("msg");//给用户指定用户输出信息
  2. player.ConsoleMessage("msg");//在玩家的控制台输出
  3. player.currentComfort //当前舒适度
  4. player.inventory.containerWear.itemList//已装备的道具Item列表
  5. player.inventory.containerMain.itemList//背包列表
  6. player.inventory.containerBelt.itemList//快捷栏放置的道具列表
  7. player.inventory.GiveItem(item itemobject)//给一个物品
  8. ItemManager.CreateByName(““);//以物品名称为依据创建一个物品对象
  9. player.health //玩家健康值
  10. player.secondsConnected //已连接时间 (单位 s)
  11. player.displayName //玩家显示名称
  12. player.userID //SteamID (数字型)
  13. player.UserIDString //SteamID (字符型)
  14. player.sleepingPlayerList //睡觉玩家对象列表
  15. player.activePlayerList //活动玩家对象列表
  16. player.transform.x //unity3d的一些属性
2017-01-21 02:21:17    132    0    0
  1. readonly Oxide.Ext.MySql.Libraries.MySql _mySql = new Oxide.Ext.MySql.Libraries.MySql();
  2. Connection _mySqlConnection;
  3. Dictionary<string, object> dbConnection;
  4. void StartConnection()
  5. {
  6. try
  7. {
  8. _mySqlConnection = _mySql.OpenDb("ip", 3306,
  9. "dbname", "user",
  10. "pwd", this);
  11. Puts("mysql 连接成功");
  12. }
  13. catch (Exception ex)
  14. {
  15. Puts("链接数据库错误 原因:" + ex.ToString());
  16. }
  17. }