Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
896 B
2
Indexable
Never
native SendClientCheck(playerid, type, arg, offset, size);
forward OnClientCheckResponse(playerid, type, arg, response);

#pragma warning disable 239
#define IsPlayerAndroid(%0)                 GetPVarInt(%0, "NotAndroid") == 0

public OnPlayerConnect(playerid)
{

    SendClientCheck(playerid, 0x48, 0, 0, 2);
    return 1;
}

public OnClientCheckResponse(playerid, type, arg, response)
{
    switch(type)
    {       
        case 0x48:
        {
            SetPVarInt(playerid, "NotAndroid", 1);	
        }
    }
    return 1;
}

// public OnPlayerLoad(playerid)
SetTimerEx("clientPlayer", 1000, true,"i", playerid);


forward clientPlayer(playerid);
public clientPlayer(playerid)
{
    if(GetPVarInt(playerid, "NotAndroid")) SetPlayerChatBubble(playerid, "PC",COLOR_GREEN,15.0,5000);
    else SetPlayerChatBubble(playerid, "Mobile",COLOR_GREEN,15.0,5000);
}
Leave a Comment