Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07fc524d27 |
+29
-15
@@ -218,12 +218,17 @@ static cell_t sm_UserHasLicenseForApp(IPluginContext *pContext, const cell_t *pa
|
|||||||
{
|
{
|
||||||
return k_EUserHasLicenseResultNoAuth;
|
return k_EUserHasLicenseResultNoAuth;
|
||||||
}
|
}
|
||||||
|
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = params[1];
|
||||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||||
|
if (pPlayer == NULL || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is not connected", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSteamID checkid = CreateCommonCSteamID(pPlayer, params, 3, 4);
|
CSteamID checkid = CreateCommonCSteamID(pPlayer, params, 3, 4);
|
||||||
@@ -245,12 +250,16 @@ static cell_t sm_UserHasLicenseForAppId(IPluginContext *pContext, const cell_t *
|
|||||||
|
|
||||||
static cell_t sm_GetClientSteamID(IPluginContext *pContext, const cell_t *params)
|
static cell_t sm_GetClientSteamID(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = params[1];
|
||||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||||
|
|
||||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||||
|
if (pPlayer == NULL || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is not connected", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSteamID steamId = CreateCommonCSteamID(pPlayer, params, 4, 5);
|
CSteamID steamId = CreateCommonCSteamID(pPlayer, params, 4, 5);
|
||||||
@@ -270,14 +279,19 @@ static cell_t sm_GetUserGroupStatus(IPluginContext *pContext, const cell_t *para
|
|||||||
|
|
||||||
if (pServer == NULL)
|
if (pServer == NULL)
|
||||||
{
|
{
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = params[1];
|
||||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||||
|
if (pPlayer == NULL || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is not connected", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSteamID checkid = CreateCommonCSteamID(pPlayer, params, 3, 4);
|
CSteamID checkid = CreateCommonCSteamID(pPlayer, params, 3, 4);
|
||||||
|
|||||||
+27
-12
@@ -60,11 +60,16 @@ static cell_t sm_RequestUserStats(IPluginContext *pContext, const cell_t *params
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = params[1];
|
||||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||||
|
if (pPlayer == NULL || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is not connected", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSteamID checkid = CreateCommonCSteamID(pPlayer, params);
|
CSteamID checkid = CreateCommonCSteamID(pPlayer, params);
|
||||||
@@ -80,11 +85,16 @@ static cell_t sm_GetStatCell(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = params[1];
|
||||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||||
|
if (pPlayer == NULL || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is not connected", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *pName;
|
char *pName;
|
||||||
@@ -123,11 +133,16 @@ static cell_t sm_GetStatFloat(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
int client = params[1];
|
||||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is invalid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||||
|
}
|
||||||
|
|
||||||
|
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||||
|
if (pPlayer == NULL || !pPlayer->IsConnected())
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("Client index %d is not connected", client);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *pName;
|
char *pName;
|
||||||
|
|||||||
Reference in New Issue
Block a user