diff options
| author | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
| commit | 5e2eb7d67ae933b7566f1944d0bb7744da03d586 (patch) | |
| tree | 054acff1113270a9cd07933df760f3768c1b6853 /sourcemod/scripting/gokz-localdb/db/set_cheater.sp | |
| parent | 341db13a008dc12bb22ceb50452d93d01476308c (diff) | |
move source stuff to its own folder
Diffstat (limited to 'sourcemod/scripting/gokz-localdb/db/set_cheater.sp')
| -rw-r--r-- | sourcemod/scripting/gokz-localdb/db/set_cheater.sp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/sourcemod/scripting/gokz-localdb/db/set_cheater.sp b/sourcemod/scripting/gokz-localdb/db/set_cheater.sp deleted file mode 100644 index c63f161..0000000 --- a/sourcemod/scripting/gokz-localdb/db/set_cheater.sp +++ /dev/null @@ -1,64 +0,0 @@ -/* - Sets whether player is a cheater in the database. -*/ - - - -void DB_SetCheater(int cheaterClient, bool cheater) -{ - if (gB_Cheater[cheaterClient] == cheater) - { - return; - } - - gB_Cheater[cheaterClient] = cheater; - - DataPack data = new DataPack(); - data.WriteCell(-1); - data.WriteCell(GetSteamAccountID(cheaterClient)); - data.WriteCell(cheater); - - char query[128]; - - Transaction txn = SQL_CreateTransaction(); - - FormatEx(query, sizeof(query), sql_players_set_cheater, cheater ? 1 : 0, GetSteamAccountID(cheaterClient)); - txn.AddQuery(query); - - SQL_ExecuteTransaction(gH_DB, txn, DB_TxnSuccess_SetCheater, DB_TxnFailure_Generic_DataPack, data, DBPrio_High); -} - -void DB_SetCheaterSteamID(int client, int cheaterSteamID, bool cheater) -{ - DataPack data = new DataPack(); - data.WriteCell(client == 0 ? -1 : GetClientUserId(client)); // -1 if called from server console - data.WriteCell(cheaterSteamID); - data.WriteCell(cheater); - - char query[128]; - - Transaction txn = SQL_CreateTransaction(); - - FormatEx(query, sizeof(query), sql_players_set_cheater, cheater ? 1 : 0, cheaterSteamID); - txn.AddQuery(query); - - SQL_ExecuteTransaction(gH_DB, txn, DB_TxnSuccess_SetCheater, DB_TxnFailure_Generic_DataPack, data, DBPrio_High); -} - -public void DB_TxnSuccess_SetCheater(Handle db, DataPack data, int numQueries, Handle[] results, any[] queryData) -{ - data.Reset(); - int client = GetClientOfUserId(data.ReadCell()); - int steamID = data.ReadCell(); - bool cheater = view_as<bool>(data.ReadCell()); - delete data; - - if (cheater) - { - GOKZ_PrintToChatAndLog(client, true, "%t", "Set Cheater", steamID & 1, steamID >> 1); - } - else - { - GOKZ_PrintToChatAndLog(client, true, "%t", "Set Not Cheater", steamID & 1, steamID >> 1); - } -}
\ No newline at end of file |
