removed ability for nosteamers

This commit is contained in:
jenz 2023-07-12 22:58:57 +02:00
parent 265dfce9d7
commit 97df90ed62

View File

@ -1,5 +1,6 @@
#pragma semicolon 1 #pragma semicolon 1
#include <PlayerManager>
#include <sourcemod> #include <sourcemod>
#pragma newdecls required #pragma newdecls required
@ -27,7 +28,7 @@ public Plugin myinfo =
name = "UNLOZE_VIP_Test", name = "UNLOZE_VIP_Test",
author = "Neon", author = "Neon",
description = "", description = "",
version = "2.0", version = "2.1",
url = "https://steamcommunity.com/id/n3ontm" url = "https://steamcommunity.com/id/n3ontm"
} }
@ -171,17 +172,23 @@ public void OnClientPostAdminFilter(int client)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public Action Command_VIP(int client, int iArgs) public Action Command_VIP(int client, int iArgs)
{ {
if (!IsValidClient(client)) if (!IsValidClient(client))
return Plugin_Handled; return Plugin_Handled;
char sSteamID[32]; if (!PM_IsPlayerSteam(client))
GetClientAuthId(client, AuthId_Steam2, sSteamID, sizeof(sSteamID)); {
PrintToChat(client, "Nosteam cant use test vip anymore.");
return Plugin_Handled;
}
char sQuery[255]; char sSteamID[32];
Format(sQuery, sizeof(sQuery), "SELECT * FROM testvip_table WHERE steam_auth = '%s'", sSteamID); GetClientAuthId(client, AuthId_Steam2, sSteamID, sizeof(sSteamID));
SQL_TQuery(g_hDatabase, TQueryCBCommand, sQuery, GetClientUserId(client));
return Plugin_Handled; char sQuery[255];
Format(sQuery, sizeof(sQuery), "SELECT * FROM testvip_table WHERE steam_auth = '%s'", sSteamID);
SQL_TQuery(g_hDatabase, TQueryCBCommand, sQuery, GetClientUserId(client));
return Plugin_Handled;
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
@ -295,4 +302,4 @@ public bool IsVIP(int client)
} }
} }
return false; return false;
} }