samp.directory
← Skrypty i biblioteki

adib-yg/SAMP-Mobile-Checker

This include detects players who are connected to the server with the SA-MP Mobile client

Narzędzie★ 11zaktualizowano lut 2024OtherPawnsampctl
Otwórz na GitHubie

Zainstaluj za pomocą sampctl

sampctl package install adib-yg/SAMP-Mobile-Checker

Uruchom to w folderze swojego projektu. sampctl pobiera pakiet i to, od czego zależy.

README.md

SAMP-Mobile-Checker

This include detects players who are connected to the server with the SA-MP Mobile client.

Installation

Simply install to your project:

sampctl install adib-yg/SAMP-Mobile-Checker

Include in your code and begin using the include:

#include <mobile-checker>

How Does It Work

The CI serial of SA-MP Mobile players is always the same.

So we just check with strcmp the CI serial of player is the same or not.

Usage

#include <mobile-checker>

public OnPlayerConnectViaSampMobile(playerid) 
{
    SendClientMessage(playerid, -1, "You are using SA-MP Mobile client!");
}

public OnPlayerSpawn(playerid) 
{
    if (IsPlayerUsingSampMobile(playerid)) 
    {
        SendClientMessage(playerid, -1, "You are using SA-MP Mobile client!");
    }
}

Functions

bool: IsPlayerUsingSampMobile(playerid); // Also works in OnPlayerConnect() callback

Callbacks

forward OnPlayerConnectViaSampMobile(playerid);

androidlaunchermobileopen-mpsa-mpsamp

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

adib-yg/SAMP-Mobile-Checker: Narzędzie SA-MP | samp.directory