Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07fc524d27 |
+28
-14
@@ -219,11 +219,16 @@ static cell_t sm_UserHasLicenseForApp(IPluginContext *pContext, const cell_t *pa
|
||||
return k_EUserHasLicenseResultNoAuth;
|
||||
}
|
||||
|
||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
||||
int client = params[1];
|
||||
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||
{
|
||||
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);
|
||||
@@ -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)
|
||||
{
|
||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client);
|
||||
|
||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
||||
int client = params[1];
|
||||
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||
{
|
||||
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);
|
||||
@@ -270,14 +279,19 @@ static cell_t sm_GetUserGroupStatus(IPluginContext *pContext, const cell_t *para
|
||||
|
||||
if (pServer == NULL)
|
||||
{
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
||||
int client = params[1];
|
||||
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||
{
|
||||
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);
|
||||
|
||||
+27
-12
@@ -60,11 +60,16 @@ static cell_t sm_RequestUserStats(IPluginContext *pContext, const cell_t *params
|
||||
return 0;
|
||||
}
|
||||
|
||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
||||
int client = params[1];
|
||||
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||
{
|
||||
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);
|
||||
@@ -80,11 +85,16 @@ static cell_t sm_GetStatCell(IPluginContext *pContext, const cell_t *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
||||
int client = params[1];
|
||||
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||
{
|
||||
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;
|
||||
@@ -123,11 +133,16 @@ static cell_t sm_GetStatFloat(IPluginContext *pContext, const cell_t *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int client = gamehelpers->ReferenceToIndex(params[1]);
|
||||
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(client); /* Man, including GameHelpers and PlayerHelpers for this native :(. */
|
||||
if (pPlayer == NULL || pPlayer->IsConnected() == false)
|
||||
int client = params[1];
|
||||
if (client < 1 || client > playerhelpers->GetMaxClients())
|
||||
{
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user