Skip to content

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

License

Notifications You must be signed in to change notification settings

adib-yg/SAMP-Mobile-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAMP-Mobile-Checker

sampctl

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

SA-MP Launcher samp-mobile-icon Detected
Alyn SA-MP Mobile logo Detected

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);

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages