Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1018 Bytes

README.md

File metadata and controls

37 lines (30 loc) · 1018 Bytes

FiveM-PHP 🐌

packagist-stable packagist-license packagist-download

Installation

Pull in the project using composer: composer require itexzoz/fivem-php

Constants

ServerFilter [ EMPTY, GET_PLAYER, GET_RESOURCES, GET_VARS]

ServerlistFilter [EMPTY, GET_PLAYER, GET_RESOURCES, GET_SERVERS]

DirectServerFilter [PLAYERS, SERVER_INFO]

Get specific server information from FiveM Masterlist

echo (new Serverslist)->Get()->Server(['149.202.65.148', 30120], ServerFilter::EMPTY);
try {
    echo (new Serverslist)->Get()->Global(ServerlistFilter::EMPTY);
} catch (Exception $e) {
}

Get specific server information with direct connect

try {
    echo (new DirectServer())->Get()->Server(["149.202.65.148", 30120], DirectServerFilter::SERVER_INFO);
} catch (EmptyDirectServerFilterException $e) {
}