samp.directory
← Skrypty i biblioteki

EvilFreelancer/samp-api-php

GTA San Andreas Multiplayer PHP client for work with remote console

Narzędzie★ 4zaktualizowano kwi 2020Brak licencjiPHP
Otwórz na GitHubie

To repozytorium nie ma pliku licencji. Jest publiczne do odczytu, ale samo to nie daje pozwolenia na ponowne użycie.

README.md

SAMP API PHP client

Simple PHP client for San Andreas Multiplayer server for executing commands on remote console.

composer require evilfreelancer/samp-api-php

How to use

<?php
require_once __DIR__ . '/../vendor/autoload.php';

$config = new \SampApi\Config([
    'server'   => 'localhost',
    'port'     => '7777',
    'password' => '12345',
]);
$client = new \SampApi\Rcon($config);

// Get list of vars (only this method is ready for right now)
$response = $client->getVarlist();
dump($response);

// Another way
$response = $client->send('varlist');
dump($response);

// Yet another way, OOP style
$client->responseModel = true;
$response = $client->getVarlist();
dump($response);

List of all available commands can be found here.

Links

Documentation and some important links

Alternatives

api-clientsampsamp-clientsocket-clientudp-client

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem

EvilFreelancer/samp-api-php: Narzędzie SA-MP | samp.directory