【文件属性】:
文件名称:fivem:用于与FiveM API进行交互JavaScript API
文件大小:18KB
文件格式:ZIP
更新时间:2021-05-08 05:05:14
JavaScript
五百万
用于获取FiveM服务器信息和状态的API。
安装
安装软件包:npm i Fivem
用法
例子
查看服务器是否在线(json)
const FiveM = require ( "fivem" ) // Import the npm package.
const srv = new FiveM . Server ( 'IP:PORT' ) // Set the IP with port.
srv . getServerStatus ( ) . then ( data => console . log ( data ) ) // Get & log the data!
//if online returns json {online: true}
// if offline returns json {online: false, url: x, method: x}
获取玩家
【文件预览】:
fivem-master
----.github()
--------ISSUE_TEMPLATE()
--------workflows()
----LICENSE(34KB)
----.gitignore(2KB)
----index.js(4KB)
----readme.md(2KB)
----package.json(637B)