Jump to content

Search the Community

Showing results for tags 'go'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Java
  • C#
  • SQF
  • UE4 蓝图
  • Go语言
  • C++
  • MySql


  • Files


  • Community Calendar


  • A Test Category
    • A Test Forum

Product Groups

  • FDS

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 1 result

  1. 使用rcon可以用 "github.com/verocity-gaming/rcon" 的rcon依赖,新建Go项目,然后导入 import ( "github.com/verocity-gaming/rcon" ) 初始化rcon连接 IP例如127.0.0.1:27015 c, err := rcon.New(ip, password) if err != nil { println("连接服务器失败!") panic(err) } 假如我要执行RCON指令来换图 mapName 这个变量就是地图名了 p := c.SetMap(rcon.MapName(mapName)) if p == nil { fmt.Sprintf("操作成功!") } else { fmt.Sprintf("%s", p) } 然后下面是可用的功能 可以自行实现: func New(addr string, password string) (*Conn, error) func (c *Conn) AdminAdd(a Admin) error func (c *Conn) AdminGroups() ([]string, error) func (c *Conn) AdminRemove(a Admin) error func (c *Conn) Admins() ([]Admin, error) func (c *Conn) AutoBalance() (bool, error) func (c *Conn) AutoBalanceThreshold() (int, error) func (c *Conn) BanPermanently(p Player, reason, admin string) error func (c *Conn) BanRemove(p Player) error func (c *Conn) BanTemporarily(p Player, hours int, reason, admin string) error func (c *Conn) Close() error func (c *Conn) IdleTime() (time.Duration, error) func (c *Conn) Kick(p Player, reason string) error func (c *Conn) Map() (Map, error) func (c *Conn) Maps() ([]Map, error) func (c *Conn) MaxPing() (time.Duration, error) func (c *Conn) Name() (string, error) func (c *Conn) PermanentlyBanned() ([]Ban, error) func (c *Conn) Player(username string) (Player, error) func (c *Conn) Players() ([]Player, error) func (c *Conn) Profanities() ([]string, error) func (c *Conn) Punish(p Player, reason string) error func (c *Conn) ResetVoteKickThreshold() error func (c *Conn) Rotation() ([]Map, error) func (c *Conn) RotationAdd(n MapName) error func (c *Conn) RotationRemove(n MapName) error func (c *Conn) SetAutoBalance(enabled bool) error func (c *Conn) SetAutoBalanceThreshold(diff int) error func (c *Conn) SetBroadcast(message string) error func (c *Conn) SetIdleTime(m time.Duration) error func (c *Conn) SetMap(n MapName) error func (c *Conn) SetMaxPing(ms time.Duration) error func (c *Conn) SetProfanities(words ...string) error func (c *Conn) SetQueueLength(length int) error func (c *Conn) SetSwitchTeamCooldown(m time.Duration) error func (c *Conn) SetSwitchTeamNow(p Player) error func (c *Conn) SetSwitchTeamOnDeath(p Player) error func (c *Conn) SetVIPSlots(slots int) error func (c *Conn) SetVoteKick(enabled bool) error func (c *Conn) SetVoteKickThreshold(pairs ...VoteKickThreshold) error func (c *Conn) Slots() (numerator, denominator int, err error) func (c *Conn) SwitchTeamCooldown() (time.Duration, error) func (c *Conn) TemporarilyBanned() ([]Ban, error) func (c *Conn) UnsetProfanities(words ...string) error func (c *Conn) VIPAdd(v VIP) error func (c *Conn) VIPRemove(v VIP) error func (c *Conn) VIPSlots() (int, error) func (c *Conn) VIPs() ([]VIP, error) func (c *Conn) VoteKick() (bool, error) 写的一个小栗子: TEST.go
  • Create New...