NoSteam: Change extension functions.
This commit is contained in:
parent
b8b460b6a7
commit
63213ce57f
@ -1,7 +1,7 @@
|
|||||||
#pragma semicolon 1
|
#pragma semicolon 1
|
||||||
|
|
||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <No_Steam_Info>
|
#include <RevEmuAPI>
|
||||||
|
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
|
|
||||||
@ -46,8 +46,8 @@ public void GetConnectionType(int client, char[] sConnectionType, int iMaxLength
|
|||||||
{
|
{
|
||||||
char sConnectionTypeInternal[32];
|
char sConnectionTypeInternal[32];
|
||||||
|
|
||||||
RevEmu_PlayerType PlayerType = RevEmu_GetPlayerType(client);
|
RevEmu_UserType PlayerType = RevEmu_GetPlayerType(client);
|
||||||
if (PlayerType == ErrorGet)
|
if (PlayerType == Unknown)
|
||||||
sConnectionTypeInternal = "Error";
|
sConnectionTypeInternal = "Error";
|
||||||
else if (PlayerType == SteamLegitUser)
|
else if (PlayerType == SteamLegitUser)
|
||||||
sConnectionTypeInternal = "SteamLegit";
|
sConnectionTypeInternal = "SteamLegit";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <basecomm>
|
#include <basecomm>
|
||||||
#include <No_Steam_Info>
|
#include <RevEmuAPI>
|
||||||
|
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
|
|
||||||
@ -275,8 +275,8 @@ public void GetConnectionType(int client, char[] sConnectionType, int iMaxLength
|
|||||||
{
|
{
|
||||||
char sConnectionTypeInternal[32];
|
char sConnectionTypeInternal[32];
|
||||||
|
|
||||||
RevEmu_PlayerType PlayerType = RevEmu_GetPlayerType(client);
|
RevEmu_UserType PlayerType = RevEmu_GetPlayerType(client);
|
||||||
if (PlayerType == ErrorGet)
|
if (PlayerType == Unknown)
|
||||||
sConnectionTypeInternal = "Error";
|
sConnectionTypeInternal = "Error";
|
||||||
else if (PlayerType == SteamLegitUser)
|
else if (PlayerType == SteamLegitUser)
|
||||||
sConnectionTypeInternal = "SteamLegit";
|
sConnectionTypeInternal = "SteamLegit";
|
||||||
|
64
includes/RevEmuAPI.inc
Normal file
64
includes/RevEmuAPI.inc
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#ifndef _RevEmuAPI_included
|
||||||
|
#define _RevEmuAPI_included
|
||||||
|
|
||||||
|
enum RevEmu_UserType
|
||||||
|
{
|
||||||
|
Invalid = -1,
|
||||||
|
SteamLegitUser = 0,
|
||||||
|
SteamCrackedUser,
|
||||||
|
RevEmuUser,
|
||||||
|
RevEmuUserOld,
|
||||||
|
SettiSRCScanBot,
|
||||||
|
RevEmuUserV74,
|
||||||
|
RevEmuUserVeryOld,
|
||||||
|
UnknownUser,
|
||||||
|
Steam2Legit,
|
||||||
|
Steam2Cracked
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if clients usertype is legit.
|
||||||
|
*
|
||||||
|
* @param clients The client index.
|
||||||
|
*
|
||||||
|
* @return True if valid, false otherwise.
|
||||||
|
* @error Invalid client index, not connected or fake client.
|
||||||
|
*/
|
||||||
|
native bool RevEmu_IsPlayerSteam(int client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve clients usertype.
|
||||||
|
*
|
||||||
|
* @param clients The client index.
|
||||||
|
*
|
||||||
|
* @return The clients usertype.
|
||||||
|
* @error Invalid client index, not connected or fake client.
|
||||||
|
*/
|
||||||
|
native RevEmu_UserType RevEmu_GetPlayerType(int client);
|
||||||
|
|
||||||
|
|
||||||
|
public Extension __ext_RevEmuAPI =
|
||||||
|
{
|
||||||
|
name = "RevEmuAPI",
|
||||||
|
file = "RevEmuAPI.ext",
|
||||||
|
#if defined AUTOLOAD_EXTENSIONS
|
||||||
|
autoload = 1,
|
||||||
|
#else
|
||||||
|
autoload = 0,
|
||||||
|
#endif
|
||||||
|
#if defined REQUIRE_EXTENSIONS
|
||||||
|
required = 1,
|
||||||
|
#else
|
||||||
|
required = 0,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !defined REQUIRE_EXTENSIONS
|
||||||
|
public __ext_RevEmuAPI_SetNTVOptional()
|
||||||
|
{
|
||||||
|
MarkNativeAsOptional("RevEmu_IsPlayerSteam");
|
||||||
|
MarkNativeAsOptional("RevEmu_GetPlayerType");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif //_RevEmuAPI_included
|
Loading…
Reference in New Issue
Block a user