Help Mobile/Pc

Expl01T3R

Active member
Joined
Nov 20, 2022
Messages
128
Reaction score
21
Location
Czech Republic
Hello UGBASE,
Is there any way to detect if remote player is using Mobile/Android or PC from client-side (cheat software)?​
 

SobFoX

Expert
Joined
Jul 14, 2015
Messages
1,461
Solutions
5
Reaction score
913
Location
Israel
This code was added by a bunch of lua moonloader programmers who wanted to add this to the project so I added to their request
I don't think it's perfect, but it's definitely the most popular code, there are other ways, but it varies from different mobile versions
C:
//onfoot

if (onfoot_raknet.sKeys == 160)
                g_samp.players[pPlayerID].Mobile = 0;


    if(onfoot_raknet.sLeftRightKeys != 128 && onfoot_raknet.sLeftRightKeys != 65408)
                    g_samp.players[pPlayerID].Mobile = 1;

if (onfoot_raknet.sUpDownKeys != 128 && onfoot_raknet.sUpDownKeys != 65408)
                g_samp.players[pPlayerID].Mobile = 1;

if(onfoot_raknet.byteSpecialAction != 0 && onfoot_raknet.byteSpecialAction != 1)
                g_samp.players[pPlayerID].Mobile = 0;

//driver
if (driver_raknet.sLeftRightKeys != 128 && driver_raknet.sLeftRightKeys != 65408)
                g_samp.players[pPlayerID].Mobile = 1;

//if player send ID_UNOCCUPIED_SYNC
g_samp.players[pPlayerID].Mobile = 0;
 
Top