diff --git a/scripting/include/kento_rankme/cmds.inc b/scripting/include/kento_rankme/cmds.inc index 19b2d6c..d421cf9 100644 --- a/scripting/include/kento_rankme/cmds.inc +++ b/scripting/include/kento_rankme/cmds.inc @@ -162,7 +162,7 @@ public Action CMD_TopWeapon(int client, int args){ } else { Menu menu = CreateMenu(MenuHandler_TopWeapon_Choose); menu.SetTitle("Top Weapon:"); - for(int i=0;i<42;i++){ + for(int i=0;i<51;i++){ menu.AddItem(g_sWeaponsNamesGame[i],g_sWeaponsNamesFull[i]); } menu.Display(client,MENU_TIME_FOREVER); @@ -335,72 +335,72 @@ void ShowTOP(int client, int at){ } public void SQL_TopCallback(Handle owner, Handle hndl, const char[] error, any Datapack){ - if(hndl == INVALID_HANDLE) - { - LogError("[RankMe] Query Fail: %s", error); - PrintToServer(error); - return; - } - - ResetPack(Datapack); - int i; - int client = ReadPackCell(Datapack); - if(client == 0 || !IsClientInGame(client)) - return; - int at = ReadPackCell(Datapack); - CloseHandle(Datapack); - if(!SQL_HasResultSet(hndl) || SQL_GetRowCount(hndl) ==0){ - ShowTOP(client,g_TotalPlayers-9); - return; - } - char name[256]; - char temp[500]; - - Menu menu = CreateMenuEx(GetMenuStyleHandle(MenuStyle_Radio),MenuHandler_Top); - - float kdr; - Format(temp,sizeof(temp)," %T\n","Showing",client,at+1,at+10,g_TotalPlayers); - menu.SetTitle(""); - char sBuffer[200]; - while(SQL_HasResultSet(hndl) && SQL_FetchRow(hndl)) - { - - i++; - - SQL_FetchString(hndl,2,name,sizeof(name)); - - - int deaths; - if(SQL_FetchInt(hndl,6) == 0) - deaths = 1; - else - deaths=SQL_FetchInt(hndl,6); - - kdr = SQL_FetchFloat(hndl,5)/deaths; - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) - KDR: %.2f\n",i+at,name,SQL_FetchInt(hndl,4),kdr); - - if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ - Format(temp,sizeof(temp),"%s%s",temp,sBuffer); - sBuffer="\0"; - } - } - Format(temp,sizeof(temp),"%s\n",temp); - menu.AddItem(temp,temp); - - - IntToString(at+i,temp,sizeof(temp)); - char temp1[20]; - Format(temp1,sizeof(temp1),"%T","Next",client); - if(i>9) - menu.AddItem(temp,temp1); - IntToString(at-i,temp,sizeof(temp)); - Format(temp1,sizeof(temp1),"%T","Back",client); - if(at+i-1 >9) - menu.AddItem(temp,temp1); - - menu.DisplayAt(client,at,MENU_TIME_FOREVER); + if(hndl == INVALID_HANDLE) + { + LogError("[RankMe] Query Fail: %s", error); + PrintToServer(error); + return; + } + + ResetPack(Datapack); + int client = ReadPackCell(Datapack); + if(client == 0 || !IsClientInGame(client)) + return; + + int at = ReadPackCell(Datapack); + CloseHandle(Datapack); + + if(!SQL_HasResultSet(hndl) || SQL_GetRowCount(hndl) == 0){ + ShowTOP(client, g_TotalPlayers - 9); + return; + } + + char name[256]; + char temp[500]; + Menu menu = CreateMenuEx(GetMenuStyleHandle(MenuStyle_Radio), MenuHandler_Top); + float kdr; + Format(temp, sizeof(temp), " %T\n", "Showing", client, at + 1, at + 5, g_TotalPlayers); // Show up to 5 players + + char sBuffer[200]; + int i = 0; // Initialize the counter here + while(SQL_HasResultSet(hndl) && SQL_FetchRow(hndl) && i < 5) // Limit to 5 players + { + i++; + SQL_FetchString(hndl, 2, name, sizeof(name)); + + int deaths = SQL_FetchInt(hndl, 6); + if(deaths == 0) + deaths = 1; // Avoid division by zero + + kdr = SQL_FetchFloat(hndl, 5) / deaths; + Format(sBuffer, sizeof(sBuffer), "%d - %s (%d) - Kills: %d, Deaths: %d, Headshots: %d, KDR: %.2f\n", + i + at, name, SQL_FetchInt(hndl, 4), SQL_FetchInt(hndl, 5), + deaths, SQL_FetchInt(hndl, 12), kdr); + + if(strlen(temp) + strlen(sBuffer) < MAX_LENGTH_MENU){ + Format(temp, sizeof(temp), "%s%s", temp, sBuffer); + sBuffer[0] = '\0'; // Clear buffer + } + } + + Format(temp, sizeof(temp), "%s\n", temp); + menu.AddItem(temp, temp); + + // Only add next/back if applicable + IntToString(at + i, temp, sizeof(temp)); + char temp1[20]; + Format(temp1, sizeof(temp1), "%T", "Next", client); + if(i == 5) // Show next only if we have 5 players + menu.AddItem(temp, temp1); + IntToString(at - i, temp, sizeof(temp)); + Format(temp1, sizeof(temp1), "%T", "Back", client); + if(at + i - 1 > 5) // Show back if we have more than 5 in the previous pages + menu.AddItem(temp, temp1); + + menu.DisplayAt(client, at, MENU_TIME_FOREVER); } + public int MenuHandler_Top(Menu menu, MenuAction action, int param1, int param2){ if (action == MenuAction_Select) @@ -590,7 +590,7 @@ public void SQL_TopKillsCallback(Handle owner, Handle hndl, const char[] error, Menu menu = CreateMenuEx(GetMenuStyleHandle(MenuStyle_Radio),MenuHandler_TopKills); - Format(temp,sizeof(temp)," %T\n","Showing",client,at+1,at+10,g_TotalPlayers); + Format(temp,sizeof(temp)," %T\n","Showing",client,at+1,at+5,g_TotalPlayers); menu.SetTitle(""); char sBuffer[200]; while(SQL_HasResultSet(hndl) && SQL_FetchRow(hndl)) @@ -1489,7 +1489,7 @@ public void SQL_StatsMe2Callback(Handle owner, Handle hndl, const char[] error, rounds = 1; } - int idamage = SQL_FetchInt(hndl,76); + int idamage = SQL_FetchInt(hndl,85); float damage = IntToFloat(idamage); int hits = SQL_FetchInt(hndl,11); @@ -1509,22 +1509,22 @@ public void SQL_StatsMe2Callback(Handle owner, Handle hndl, const char[] error, StrCat(text,sizeof(text),temp); Format(temp,sizeof(temp),"%T: %d %T: %.2f %T: %.2f\n","Damage", client, idamage,"KPR", client, kills/rounds, "DPR", client, damage/rounds); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d \n","First Bloods", client, SQL_FetchInt(hndl, 80)); + Format(temp,sizeof(temp),"%T: %d \n","First Bloods", client, SQL_FetchInt(hndl, 89)); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d %T: %d\n","Thru Smokes", client, SQL_FetchInt(hndl, 83), "Flashed Kills", client, SQL_FetchInt(hndl, 84)); + Format(temp,sizeof(temp),"%T: %d %T: %d\n","Thru Smokes", client, SQL_FetchInt(hndl, 92), "Flashed Kills", client, SQL_FetchInt(hndl, 93)); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d\n","AssistFlashes", client, SQL_FetchInt(hndl, 85)); + Format(temp,sizeof(temp),"%T: %d\n","AssistFlashes", client, SQL_FetchInt(hndl, 94)); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d\n","AssistTeamFlashes", client, SQL_FetchInt(hndl, 86)); + Format(temp,sizeof(temp),"%T: %d\n","AssistTeamFlashes", client, SQL_FetchInt(hndl, 95)); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d\n","Wallbangs", client, SQL_FetchInt(hndl, 88)); + Format(temp,sizeof(temp),"%T: %d\n","Wallbangs", client, SQL_FetchInt(hndl, 97)); StrCat(text,sizeof(text),temp); panel.AddItem("",text); text=""; Format(temp,sizeof(temp),"- %T\n","RoundStats",client); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d/%d %T: %d/%d %T: %d\n%T: %d %T: %d %T: %d\n","TRWins",client,SQL_FetchInt(hndl,70),SQL_FetchInt(hndl,14),"CTWins",client,SQL_FetchInt(hndl,69),SQL_FetchInt(hndl,15),"MVPs",client,SQL_FetchInt(hndl,75), "MatchWins", client, SQL_FetchInt(hndl, 77), "MatchDraws", client, SQL_FetchInt(hndl, 78), "MatchLosses", client, SQL_FetchInt(hndl, 79)); + Format(temp,sizeof(temp),"%T: %d/%d %T: %d/%d %T: %d\n%T: %d %T: %d %T: %d\n","TRWins",client,SQL_FetchInt(hndl,79),SQL_FetchInt(hndl,14),"CTWins",client,SQL_FetchInt(hndl,78),SQL_FetchInt(hndl,15),"MVPs",client,SQL_FetchInt(hndl,84), "MatchWins", client, SQL_FetchInt(hndl, 86), "MatchDraws", client, SQL_FetchInt(hndl, 87), "MatchLosses", client, SQL_FetchInt(hndl, 88)); StrCat(text,sizeof(text),temp); panel.AddItem("",text); text=""; @@ -1538,16 +1538,16 @@ public void SQL_StatsMe2Callback(Handle owner, Handle hndl, const char[] error, Format(temp,sizeof(temp),"- %T\n","NoScopeStats",client); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d %T: %.2fm \n","NoScopes",client,SQL_FetchInt(hndl,81), "Farthest", client, IntToFloat(SQL_FetchInt(hndl,82))/100 ); + Format(temp,sizeof(temp),"%T: %d %T: %.2fm \n","NoScopes",client,SQL_FetchInt(hndl,90), "Farthest", client, IntToFloat(SQL_FetchInt(hndl,91))/100 ); StrCat(text,sizeof(text),temp); panel.AddItem("",text); text=""; Format(temp,sizeof(temp),"- %T\n","BombHostagesStats",client); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d %T: %d %T: %d\n","PlantedBombs",client,SQL_FetchInt(hndl,66),"ExplodedBombs",client,SQL_FetchInt(hndl,67),"DefusedBombs",client,SQL_FetchInt(hndl,68)); + Format(temp,sizeof(temp),"%T: %d %T: %d %T: %d\n","PlantedBombs",client,SQL_FetchInt(hndl,75),"ExplodedBombs",client,SQL_FetchInt(hndl,76),"DefusedBombs",client,SQL_FetchInt(hndl,77)); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d\n","RescuedHostages",client,SQL_FetchInt(hndl,71)); + Format(temp,sizeof(temp),"%T: %d\n","RescuedHostages",client,SQL_FetchInt(hndl,80)); StrCat(text,sizeof(text),temp); panel.AddItem("",text); text=""; @@ -1555,7 +1555,7 @@ public void SQL_StatsMe2Callback(Handle owner, Handle hndl, const char[] error, if(g_bVipEnabled){ Format(temp,sizeof(temp),"- %T\n","VIPStats",client); StrCat(text,sizeof(text),temp); - Format(temp,sizeof(temp),"%T: %d/%d %T: %d\n","VIPEscapes",client,SQL_FetchInt(hndl,73),SQL_FetchInt(hndl,74),"VIPsKilled",client,SQL_FetchInt(hndl,72)); + Format(temp,sizeof(temp),"%T: %d/%d %T: %d\n","VIPEscapes",client,SQL_FetchInt(hndl,82),SQL_FetchInt(hndl,83),"VIPsKilled",client,SQL_FetchInt(hndl,81)); StrCat(text,sizeof(text),temp); panel.AddItem("",text); text=""; @@ -2423,7 +2423,7 @@ public void SQL_TopMVPCallback(Handle owner, Handle hndl, const char[] error, an - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) - %t: %d\n",i+at,name,SQL_FetchInt(hndl,4),"MVPs",SQL_FetchInt(hndl,75)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) - %t: %d\n",i+at,name,SQL_FetchInt(hndl,4),"MVPs",SQL_FetchInt(hndl,84)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -2537,7 +2537,7 @@ public void SQL_TopDamageCallback(Handle owner, Handle hndl, const char[] error, - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) - %t: %d\n",i+at,name,SQL_FetchInt(hndl,4),"Damage",SQL_FetchInt(hndl,74)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) - %t: %d\n",i+at,name,SQL_FetchInt(hndl,4),"Damage",SQL_FetchInt(hndl,85)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -2891,7 +2891,7 @@ public void SQL_TopFBCallback(Handle owner, Handle hndl, const char[] error, any i++; SQL_FetchString(hndl,2,name,sizeof(name)); - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,80)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,89)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -3000,7 +3000,7 @@ public void SQL_TopNSCallback(Handle owner, Handle hndl, const char[] error, any i++; SQL_FetchString(hndl,2,name,sizeof(name)); - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,81)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,90)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -3110,7 +3110,7 @@ public void SQL_TopNSDCallback(Handle owner, Handle hndl, const char[] error, an SQL_FetchString(hndl,2,name,sizeof(name)); - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %.2fm\n",i+at,name,SQL_FetchInt(hndl,4), IntToFloat(SQL_FetchInt(hndl,82))/100); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %.2fm\n",i+at,name,SQL_FetchInt(hndl,4), IntToFloat(SQL_FetchInt(hndl,91))/100); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -3219,7 +3219,7 @@ public void SQL_TopBlindCallback(Handle owner, Handle hndl, const char[] error, i++; SQL_FetchString(hndl,2,name,sizeof(name)); - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,84)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,93)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -3328,7 +3328,7 @@ public void SQL_TopSmokeCallback(Handle owner, Handle hndl, const char[] error, i++; SQL_FetchString(hndl,2,name,sizeof(name)); - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,83)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,92)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); @@ -3437,7 +3437,7 @@ public void SQL_TopWallCallback(Handle owner, Handle hndl, const char[] error, a i++; SQL_FetchString(hndl,2,name,sizeof(name)); - Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,88)); + Format(sBuffer,sizeof(sBuffer),"%d - %s (%d) : %d\n",i+at,name,SQL_FetchInt(hndl,4),SQL_FetchInt(hndl,97)); if(strlen(temp)+strlen(sBuffer) < MAX_LENGTH_MENU){ Format(temp,sizeof(temp),"%s%s",temp,sBuffer); diff --git a/scripting/include/kento_rankme/natives.inc b/scripting/include/kento_rankme/natives.inc index 6187f63..6bb171f 100644 --- a/scripting/include/kento_rankme/natives.inc +++ b/scripting/include/kento_rankme/natives.inc @@ -9,7 +9,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max CreateNative("RankMe_GetHitbox", Native_GetHitbox); CreateNative("RankMe_IsPlayerLoaded", Native_IsPlayerLoaded); - RegPluginLibrary("rankme"); + RegPluginLibrary("rankme_advanced"); return APLRes_Success; } @@ -218,4 +218,4 @@ public int Native_IsPlayerLoaded(Handle plugin, int numParams) { int client = GetNativeCell(1); return OnDB[client]; -} \ No newline at end of file +} diff --git a/scripting/include/kento_rankme/rankme.inc b/scripting/include/kento_rankme/rankme.inc index 674394d..2dcfc4d 100644 --- a/scripting/include/kento_rankme/rankme.inc +++ b/scripting/include/kento_rankme/rankme.inc @@ -4,48 +4,58 @@ #define _rankme_included enum struct WEAPONS_ENUM{ - int KNIFE; - int GLOCK; - int HKP2000; - int USP_SILENCER; - int P250; - int DEAGLE; - int ELITE; - int FIVESEVEN; - int TEC9; - int CZ75A; - int REVOLVER; - int NOVA; - int XM1014; - int MAG7; - int SAWEDOFF; - int BIZON; - int MAC10; - int MP9; - int MP7; - int UMP45; - int P90; - int GALILAR; - int AK47; - int SCAR20; - int FAMAS; - int M4A1; - int M4A1_SILENCER; - int AUG; - int SSG08; - int SG556; - int AWP; - int G3SG1; - int M249; - int NEGEV; - int HEGRENADE; - int FLASHBANG; - int SMOKEGRENADE; - int INFERNO; - int DECOY; - int TASER; - int MP5SD; - int BREACHCHARGE; + int KNIFE; //done + int GLOCK; //done + int HKP2000; //done + int USP_SILENCER; //done + int P250; //done + int DEAGLE; //done + int ELITE; //done + int FIVESEVEN; //done + int TEC9; //done + int CZ75A; //done + int REVOLVER; //done + int NOVA; //done + int XM1014; //done + int MAG7; //done + int SAWEDOFF; //done + int BIZON; //done + int MAC10; //done + int MP9; //done + int MP7; //done + int UMP45; //done + int P90; //done + int GALILAR; //done + int AK47; //done + int SCAR20; //done + int FAMAS; //done + int M4A1; //done + int M4A1_SILENCER; //done + int AUG; //done + int SSG08; //done + int SG556; //done + int AWP; //done + int G3SG1; //done + int M249; //done + int NEGEV; //done + int HEGRENADE; //done + int FLASHBANG; //done + int SMOKEGRENADE; //done + int INFERNO; //done + int DECOY; //done + int TASER; //done + int MP5SD; //done + int BREACHCHARGE; //done + // CSS:S + int M3; //done + int USP; //done + int P228; //done + int GALIL; //done + int SCOUT; //done + int SG552; //done + int SG550; //done + int MP5NAVY; //done + int TMP; //done int GetData(int[] data) { data[0] = this.KNIFE; data[1] = this.GLOCK; @@ -89,6 +99,17 @@ enum struct WEAPONS_ENUM{ data[39] = this.TASER; data[40] = this.MP5SD; data[41] = this.BREACHCHARGE; + // CSS:S + data[42] = this.M3; + data[43] = this.USP; + data[44] = this.P228; + data[45] = this.GALIL; + data[46] = this.SCOUT; + data[47] = this.SG552; + data[48] = this.SG550; + data[49] = this.MP5NAVY; + data[50] = this.TMP; + } void Reset() { this.KNIFE = 0; @@ -133,6 +154,16 @@ enum struct WEAPONS_ENUM{ this.TASER = 0; this.MP5SD = 0; this.BREACHCHARGE = 0; + // CSS:S + this.M3 = 0; + this.USP = 0; + this.P228 = 0; + this.GALIL = 0; + this.SCOUT = 0; + this.SG552 = 0; + this.SG550 = 0; + this.MP5NAVY = 0; + this.TMP = 0; } void AddKill(int num) { switch(num) { @@ -262,6 +293,34 @@ enum struct WEAPONS_ENUM{ case 41: { this.BREACHCHARGE++; } + // CS:S + case 42: { + this.M3++; + } + case 43: { + this.USP++; + } + case 44: { + this.P228++; + } + case 45: { + this.GALIL++; + } + case 46: { + this.SCOUT++; + } + case 47: { + this.SG552++; + } + case 48: { + this.SG550++; + } + case 49: { + this.MP5NAVY++; + } + case 50: { + this.TMP++; + } } } } @@ -527,4 +586,4 @@ forward Action RankMe_OnPlayerLoaded(int client); * @param client The client index of the player that has been saved * @noreturn **********************************************************************/ -forward Action RankMe_OnPlayerSaved(int client); \ No newline at end of file +forward Action RankMe_OnPlayerSaved(int client); diff --git a/scripting/kento_rankme.sp b/scripting/kento_rankme.sp index 67e37f2..8f150ef 100644 --- a/scripting/kento_rankme.sp +++ b/scripting/kento_rankme.sp @@ -1,6 +1,6 @@ #pragma semicolon 1 -#define PLUGIN_VERSION "3.0.3.Kento.33.3" +#define PLUGIN_VERSION "3.3.1" #include #include @@ -19,11 +19,11 @@ #define CT 3 #define SENDER_WORLD 0 -#define MAX_LENGTH_MENU 470 +#define MAX_LENGTH_MENU 512 -static const char g_sSqliteCreate[] = "CREATE TABLE IF NOT EXISTS `%s` (id INTEGER PRIMARY KEY, steam VARCHAR(40) NOT NULL, name TEXT, lastip TEXT, score NUMERIC, kills NUMERIC, deaths NUMERIC, assists NUMERIC, suicides NUMERIC, tk NUMERIC, shots NUMERIC, hits NUMERIC, headshots NUMERIC, connected NUMERIC, rounds_tr NUMERIC, rounds_ct NUMERIC, lastconnect NUMERIC,knife NUMERIC,glock NUMERIC,hkp2000 NUMERIC,usp_silencer NUMERIC,p250 NUMERIC,deagle NUMERIC,elite NUMERIC,fiveseven NUMERIC,tec9 NUMERIC,cz75a NUMERIC,revolver NUMERIC,nova NUMERIC,xm1014 NUMERIC,mag7 NUMERIC,sawedoff NUMERIC,bizon NUMERIC,mac10 NUMERIC,mp9 NUMERIC,mp7 NUMERIC,ump45 NUMERIC,p90 NUMERIC,galilar NUMERIC,ak47 NUMERIC,scar20 NUMERIC,famas NUMERIC,m4a1 NUMERIC,m4a1_silencer NUMERIC,aug NUMERIC,ssg08 NUMERIC,sg556 NUMERIC,awp NUMERIC,g3sg1 NUMERIC,m249 NUMERIC,negev NUMERIC,hegrenade NUMERIC,flashbang NUMERIC,smokegrenade NUMERIC,inferno NUMERIC,decoy NUMERIC,taser NUMERIC,mp5sd NUMERIC,breachcharge NUMERIC,head NUMERIC, chest NUMERIC, stomach NUMERIC, left_arm NUMERIC, right_arm NUMERIC, left_leg NUMERIC, right_leg NUMERIC,c4_planted NUMERIC,c4_exploded NUMERIC,c4_defused NUMERIC,ct_win NUMERIC, tr_win NUMERIC, hostages_rescued NUMERIC, vip_killed NUMERIC, vip_escaped NUMERIC, vip_played NUMERIC, mvp NUMERIC, damage NUMERIC, match_win NUMERIC, match_draw NUMERIC, match_lose NUMERIC, first_blood NUMERIC, no_scope NUMERIC, no_scope_dis NUMERIC, thru_smoke NUMERIC, blind NUMERIC, assist_flash NUMERIC, assist_team_flash NUMERIC, assist_team_kill NUMERIC, wallbang NUMERIC)"; -static const char g_sMysqlCreate[] = "CREATE TABLE IF NOT EXISTS `%s` (id INTEGER PRIMARY KEY, steam TEXT, name TEXT, lastip TEXT, score NUMERIC, kills NUMERIC, deaths NUMERIC, assists NUMERIC, suicides NUMERIC, tk NUMERIC, shots NUMERIC, hits NUMERIC, headshots NUMERIC, connected NUMERIC, rounds_tr NUMERIC, rounds_ct NUMERIC, lastconnect NUMERIC,knife NUMERIC,glock NUMERIC,hkp2000 NUMERIC,usp_silencer NUMERIC,p250 NUMERIC,deagle NUMERIC,elite NUMERIC,fiveseven NUMERIC,tec9 NUMERIC,cz75a NUMERIC,revolver NUMERIC,nova NUMERIC,xm1014 NUMERIC,mag7 NUMERIC,sawedoff NUMERIC,bizon NUMERIC,mac10 NUMERIC,mp9 NUMERIC,mp7 NUMERIC,ump45 NUMERIC,p90 NUMERIC,galilar NUMERIC,ak47 NUMERIC,scar20 NUMERIC,famas NUMERIC,m4a1 NUMERIC,m4a1_silencer NUMERIC,aug NUMERIC,ssg08 NUMERIC,sg556 NUMERIC,awp NUMERIC,g3sg1 NUMERIC,m249 NUMERIC,negev NUMERIC,hegrenade NUMERIC,flashbang NUMERIC,smokegrenade NUMERIC,inferno NUMERIC,decoy NUMERIC,taser NUMERIC,mp5sd NUMERIC,breachcharge NUMERIC,head NUMERIC, chest NUMERIC, stomach NUMERIC, left_arm NUMERIC, right_arm NUMERIC, left_leg NUMERIC, right_leg NUMERIC,c4_planted NUMERIC,c4_exploded NUMERIC,c4_defused NUMERIC,ct_win NUMERIC, tr_win NUMERIC, hostages_rescued NUMERIC, vip_killed NUMERIC, vip_escaped NUMERIC, vip_played NUMERIC, mvp NUMERIC, damage NUMERIC, match_win NUMERIC, match_draw NUMERIC, match_lose NUMERIC, first_blood NUMERIC, no_scope NUMERIC, no_scope_dis NUMERIC, thru_smoke NUMERIC, blind NUMERIC, assist_flash NUMERIC, assist_team_flash NUMERIC, assist_team_kill NUMERIC, wallbang NUMERIC) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; -static const char g_sSqlInsert[] = "INSERT INTO `%s` VALUES (NULL,'%s','%s','%s','%d','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0');"; +static const char g_sSqliteCreate[] = "CREATE TABLE IF NOT EXISTS `%s` (id INTEGER PRIMARY KEY, steam VARCHAR(40) NOT NULL, name TEXT, lastip TEXT, score NUMERIC, kills NUMERIC, deaths NUMERIC, assists NUMERIC, suicides NUMERIC, tk NUMERIC, shots NUMERIC, hits NUMERIC, headshots NUMERIC, connected NUMERIC, rounds_tr NUMERIC, rounds_ct NUMERIC, lastconnect NUMERIC,knife NUMERIC,glock NUMERIC,hkp2000 NUMERIC,usp_silencer NUMERIC,p250 NUMERIC,deagle NUMERIC,elite NUMERIC,fiveseven NUMERIC,tec9 NUMERIC,cz75a NUMERIC,revolver NUMERIC,nova NUMERIC,xm1014 NUMERIC,mag7 NUMERIC,sawedoff NUMERIC,bizon NUMERIC,mac10 NUMERIC,mp9 NUMERIC,mp7 NUMERIC,ump45 NUMERIC,p90 NUMERIC,galilar NUMERIC,ak47 NUMERIC,scar20 NUMERIC,famas NUMERIC,m4a1 NUMERIC,m4a1_silencer NUMERIC,aug NUMERIC,ssg08 NUMERIC,sg556 NUMERIC,awp NUMERIC,g3sg1 NUMERIC,m249 NUMERIC,negev NUMERIC,hegrenade NUMERIC,flashbang NUMERIC,smokegrenade NUMERIC,inferno NUMERIC,decoy NUMERIC,taser NUMERIC,mp5sd NUMERIC,breachcharge NUMERIC,m3 NUMERIC,usp NUMERIC,p228 NUMERIC,galil NUMERIC,scout NUMERIC,sg552 NUMERIC,sg550 NUMERIC,mp5navy NUMERIC,tmp NUMERIC,head NUMERIC, chest NUMERIC, stomach NUMERIC, left_arm NUMERIC, right_arm NUMERIC, left_leg NUMERIC, right_leg NUMERIC,c4_planted NUMERIC,c4_exploded NUMERIC,c4_defused NUMERIC,ct_win NUMERIC, tr_win NUMERIC, hostages_rescued NUMERIC, vip_killed NUMERIC, vip_escaped NUMERIC, vip_played NUMERIC, mvp NUMERIC, damage NUMERIC, match_win NUMERIC, match_draw NUMERIC, match_lose NUMERIC, first_blood NUMERIC, no_scope NUMERIC, no_scope_dis NUMERIC, thru_smoke NUMERIC, blind NUMERIC, assist_flash NUMERIC, assist_team_flash NUMERIC, assist_team_kill NUMERIC, wallbang NUMERIC)"; +static const char g_sMysqlCreate[] = "CREATE TABLE IF NOT EXISTS `%s` (id INTEGER PRIMARY KEY, steam TEXT, name TEXT, lastip TEXT, score NUMERIC, kills NUMERIC, deaths NUMERIC, assists NUMERIC, suicides NUMERIC, tk NUMERIC, shots NUMERIC, hits NUMERIC, headshots NUMERIC, connected NUMERIC, rounds_tr NUMERIC, rounds_ct NUMERIC, lastconnect NUMERIC,knife NUMERIC,glock NUMERIC,hkp2000 NUMERIC,usp_silencer NUMERIC,p250 NUMERIC,deagle NUMERIC,elite NUMERIC,fiveseven NUMERIC,tec9 NUMERIC,cz75a NUMERIC,revolver NUMERIC,nova NUMERIC,xm1014 NUMERIC,mag7 NUMERIC,sawedoff NUMERIC,bizon NUMERIC,mac10 NUMERIC,mp9 NUMERIC,mp7 NUMERIC,ump45 NUMERIC,p90 NUMERIC,galilar NUMERIC,ak47 NUMERIC,scar20 NUMERIC,famas NUMERIC,m4a1 NUMERIC,m4a1_silencer NUMERIC,aug NUMERIC,ssg08 NUMERIC,sg556 NUMERIC,awp NUMERIC,g3sg1 NUMERIC,m249 NUMERIC,negev NUMERIC,hegrenade NUMERIC,flashbang NUMERIC,smokegrenade NUMERIC,inferno NUMERIC,decoy NUMERIC,taser NUMERIC,mp5sd NUMERIC,breachcharge NUMERIC,m3 NUMERIC,usp NUMERIC,p228 NUMERIC,galil NUMERIC,scout NUMERIC,sg552 NUMERIC,sg550 NUMERIC,mp5navy NUMERIC,tmp NUMERIC,head NUMERIC, chest NUMERIC, stomach NUMERIC, left_arm NUMERIC, right_arm NUMERIC, left_leg NUMERIC, right_leg NUMERIC,c4_planted NUMERIC,c4_exploded NUMERIC,c4_defused NUMERIC,ct_win NUMERIC, tr_win NUMERIC, hostages_rescued NUMERIC, vip_killed NUMERIC, vip_escaped NUMERIC, vip_played NUMERIC, mvp NUMERIC, damage NUMERIC, match_win NUMERIC, match_draw NUMERIC, match_lose NUMERIC, first_blood NUMERIC, no_scope NUMERIC, no_scope_dis NUMERIC, thru_smoke NUMERIC, blind NUMERIC, assist_flash NUMERIC, assist_team_flash NUMERIC, assist_team_kill NUMERIC, wallbang NUMERIC) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; +static const char g_sSqlInsert[] = "INSERT INTO `%s` VALUES (NULL,'%s','%s','%s','%d','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0');"; /* SM1.9 Fix */ static const char g_sSqlSave[] = "UPDATE `%s` SET score = '%i', kills = '%i', deaths='%i', assists='%i',suicides='%i',tk='%i',shots='%i',hits='%i',headshots='%i', rounds_tr = '%i', rounds_ct = '%i',lastip='%s',name='%s'%s,head='%i',chest='%i', stomach='%i',left_arm='%i',right_arm='%i',left_leg='%i',right_leg='%i' WHERE steam = '%s';"; @@ -42,8 +42,8 @@ static const char g_sSqlRemoveDuplicateIpSQLite[] = "delete from `%s` where `%s` static const char g_sSqlRemoveDuplicateMySQL[] = "delete from `%s` USING `%s`, `%s` as vtable WHERE (`%s`.id>vtable.id) AND (`%s`.steam=vtable.steam);"; static const char g_sSqlRemoveDuplicateNameMySQL[] = "delete from `%s` USING `%s`, `%s` as vtable WHERE (`%s`.id>vtable.id) AND (`%s`.name=vtable.name);"; static const char g_sSqlRemoveDuplicateIpMySQL[] = "delete from `%s` USING `%s`, `%s` as vtable WHERE (`%s`.id>vtable.id) AND (`%s`.ip=vtable.ip);"; -stock const char g_sWeaponsNamesGame[42][] = { "knife", "glock", "hkp2000", "usp_silencer", "p250", "deagle", "elite", "fiveseven", "tec9", "cz75a", "revolver", "nova", "xm1014", "mag7", "sawedoff", "bizon", "mac10", "mp9", "mp7", "ump45", "p90", "galilar", "ak47", "scar20", "famas", "m4a1", "m4a1_silencer", "aug", "ssg08", "sg556", "awp", "g3sg1", "m249", "negev", "hegrenade", "flashbang", "smokegrenade", "inferno", "decoy", "taser", "mp5sd", "breachcharge"}; -stock const char g_sWeaponsNamesFull[42][] = { "Knife", "Glock", "P2000", "USP-S", "P250", "Desert Eagle", "Dual Berettas", "Five-Seven", "Tec 9", "CZ75-Auto", "R8 Revolver", "Nova", "XM1014", "Mag 7", "Sawed-off", "PP-Bizon", "MAC-10", "MP9", "MP7", "UMP45", "P90", "Galil AR", "AK-47", "SCAR-20", "Famas", "M4A4", "M4A1-S", "AUG", "SSG 08", "SG 553", "AWP", "G3SG1", "M249", "Negev", "HE Grenade", "Flashbang", "Smoke Grenade", "Inferno", "Decoy", "Zeus x27", "MP5-SD", "Breach Charges"}; +stock const char g_sWeaponsNamesGame[51][] = { "knife", "glock", "hkp2000", "usp_silencer", "p250", "deagle", "elite", "fiveseven", "tec9", "cz75a", "revolver", "nova", "xm1014", "mag7", "sawedoff", "bizon", "mac10", "mp9", "mp7", "ump45", "p90", "galilar", "ak47", "scar20", "famas", "m4a1", "m4a1_silencer", "aug", "ssg08", "sg556", "awp", "g3sg1", "m249", "negev", "hegrenade", "flashbang", "smokegrenade", "inferno", "decoy", "taser", "mp5sd", "breachcharge", "m3", "usp", "p228", "galil", "scout", "sg552", "sg550", "mp5navy", "tmp"}; +stock const char g_sWeaponsNamesFull[51][] = { "Knife", "Glock", "P2000", "USP-S", "P250", "Desert Eagle", "Dual Berettas", "Five-Seven", "Tec 9", "CZ75-Auto", "R8 Revolver", "Nova", "XM1014", "Mag 7", "Sawed-off", "PP-Bizon", "MAC-10", "MP9", "MP7", "UMP45", "P90", "Galil AR", "AK-47", "SCAR-20", "Famas", "M4A4", "M4A1-S", "AUG", "SSG 08", "SG 553", "AWP", "G3SG1", "M249", "Negev", "HE Grenade", "Flashbang", "Smoke Grenade", "Inferno", "Decoy", "Zeus x27", "MP5-SD", "Breach Charges", "Benelli M3 Super 90", "Heckler & Koch USP45 Tactical", "SIG-Sauer P228", "IMI Galil ARM", "Steyr Scout", "SIG SG 552", "SIG SG 550 SR", "Heckler & Koch MP5N", "Steyr TMP"}; char g_sSQLTable[200]; Handle g_hStatsDb; @@ -81,10 +81,10 @@ char MSG[64]; public Plugin myinfo = { name = "RankMe", - author = "lok1, Scooby, Kento, pracc, Kxnrl, CrazyHackGUT", - description = "Improved RankMe for CSGO", + author = "lok1, Scooby, Kento, pracc, Kxnrl, CrazyHackGUT, +SyntX (Added support for CS:Source)", + description = "Improved RankMe for CSS/CSGO", version = PLUGIN_VERSION, - url = "https://github.com/rogeraabbccdd/Kento-Rankme" + url = "https://github.com/id/SyntX34" //https://github.com/rogeraabbccdd/Kento-Rankme }; public void OnPluginStart() { @@ -458,9 +458,9 @@ public void OnPluginEnd() { //ReplaceString(name, sizeof(name), "'", ""); char weapons_query[2000] = ""; - int weapon_array[42]; + int weapon_array[51]; g_aWeapons[client].GetData(weapon_array); - for (int i = 0; i < 42; i++) { + for (int i = 0; i < 51; i++) { Format(weapons_query, sizeof(weapons_query), "%s,%s='%d'", weapons_query, g_sWeaponsNamesGame[i], weapon_array[i]); } @@ -534,7 +534,7 @@ public void OnPluginEnd() { public int GetWeaponNum(char[] weaponname) { - for (int i = 0; i < 42; i++) { + for (int i = 0; i < 51; i++) { if (StrEqual(weaponname, g_sWeaponsNamesGame[i])) return i; } @@ -1102,7 +1102,7 @@ public Action EventPlayerDeath(Handle event, const char [] name, bool dontBroadc g_aStats[attacker].SCORE += score_dif; g_aSession[attacker].SCORE += score_dif; int num = GetWeaponNum(weapon); - if (num < 42) g_aWeapons[attacker].AddKill(num); + if (num < 51) g_aWeapons[attacker].AddKill(num); } if (g_MinimalKills == 0 || (g_aStats[victim].KILLS >= g_MinimalKills && g_aStats[attacker].KILLS >= g_MinimalKills)) { @@ -1192,7 +1192,7 @@ public Action EventPlayerDeath(Handle event, const char [] name, bool dontBroadc } /* No scope */ - if( attacker < MAXPLAYERS && ((StrContains(weapon, "awp") != -1 || StrContains(weapon, "ssg08") != -1) || (g_bNSAllSnipers && (StrContains(weapon, "g3sg1") != -1 || StrContains(weapon, "scar20") != -1))) && (GetEntProp(attacker, Prop_Data, "m_iFOV") <= 0 || GetEntProp(attacker, Prop_Data, "m_iFOV") == GetEntProp(attacker, Prop_Data, "m_iDefaultFOV"))) + if( attacker < MAXPLAYERS && ((StrContains(weapon, "awp") != -1 || StrContains(weapon, "ssg08") != -1) || StrContains(weapon, "scout") != -1 || (g_bNSAllSnipers && (StrContains(weapon, "g3sg1") != -1 || StrContains(weapon, "scar20") != -1) || StrContains(weapon, "sg550"))) && (GetEntProp(attacker, Prop_Data, "m_iFOV") <= 0 || GetEntProp(attacker, Prop_Data, "m_iFOV") == GetEntProp(attacker, Prop_Data, "m_iDefaultFOV"))) { g_aStats[attacker].SCORE+= g_PointsNS; g_aSession[attacker].SCORE+= g_PointsNS; @@ -1387,9 +1387,9 @@ public void SalvarPlayer(int client) { //ReplaceString(name, sizeof(name), "'", ""); char weapons_query[2000] = ""; - int weapon_array[42]; + int weapon_array[51]; g_aWeapons[client].GetData(weapon_array); - for (int i = 0; i < 42; i++) { + for (int i = 0; i < 51; i++) { Format(weapons_query, sizeof(weapons_query), "%s,%s='%d'", weapons_query, g_sWeaponsNamesGame[i], weapon_array[i]); } @@ -1620,39 +1620,51 @@ public void SQL_LoadPlayerCallback(Handle owner, Handle hndl, const char[] error g_aWeapons[client].MP5SD = SQL_FetchInt(hndl, 57); g_aWeapons[client].BREACHCHARGE = SQL_FetchInt(hndl, 58); + // CS:S + g_aWeapons[client].M3 = SQL_FetchInt(hndl, 59); + g_aWeapons[client].USP = SQL_FetchInt(hndl, 60); + g_aWeapons[client].P228 = SQL_FetchInt(hndl, 61); + g_aWeapons[client].GALIL = SQL_FetchInt(hndl, 62); + g_aWeapons[client].SCOUT = SQL_FetchInt(hndl, 63); + g_aWeapons[client].SG552 = SQL_FetchInt(hndl, 64); + g_aWeapons[client].SG550 = SQL_FetchInt(hndl, 65); + g_aWeapons[client].MP5NAVY = SQL_FetchInt(hndl, 66); + g_aWeapons[client].TMP = SQL_FetchInt(hndl, 67); + //ALL 8 Hitboxes - g_aHitBox[client].HEAD = SQL_FetchInt(hndl, 59); - g_aHitBox[client].CHEST = SQL_FetchInt(hndl, 60); - g_aHitBox[client].STOMACH = SQL_FetchInt(hndl, 61); - g_aHitBox[client].LEFT_ARM = SQL_FetchInt(hndl, 62); - g_aHitBox[client].RIGHT_ARM = SQL_FetchInt(hndl, 63); - g_aHitBox[client].LEFT_LEG = SQL_FetchInt(hndl, 64); - g_aHitBox[client].RIGHT_LEG = SQL_FetchInt(hndl, 65); + g_aHitBox[client].HEAD = SQL_FetchInt(hndl, 68); + g_aHitBox[client].CHEST = SQL_FetchInt(hndl, 69); + g_aHitBox[client].STOMACH = SQL_FetchInt(hndl, 70); + g_aHitBox[client].LEFT_ARM = SQL_FetchInt(hndl, 71); + g_aHitBox[client].RIGHT_ARM = SQL_FetchInt(hndl, 72); + g_aHitBox[client].LEFT_LEG = SQL_FetchInt(hndl, 73); + g_aHitBox[client].RIGHT_LEG = SQL_FetchInt(hndl, 74); // other stats - g_aStats[client].C4_PLANTED = SQL_FetchInt(hndl, 66); - g_aStats[client].C4_EXPLODED = SQL_FetchInt(hndl, 67); - g_aStats[client].C4_DEFUSED = SQL_FetchInt(hndl, 68); - g_aStats[client].CT_WIN = SQL_FetchInt(hndl, 69); - g_aStats[client].TR_WIN = SQL_FetchInt(hndl, 70); - g_aStats[client].HOSTAGES_RESCUED = SQL_FetchInt(hndl, 71); - g_aStats[client].VIP_KILLED = SQL_FetchInt(hndl, 72); - g_aStats[client].VIP_ESCAPED = SQL_FetchInt(hndl, 73); - g_aStats[client].VIP_PLAYED = SQL_FetchInt(hndl, 74); - g_aStats[client].MVP = SQL_FetchInt(hndl, 75); - g_aStats[client].DAMAGE = SQL_FetchInt(hndl, 76); - g_aStats[client].MATCH_WIN = SQL_FetchInt(hndl, 77); - g_aStats[client].MATCH_DRAW = SQL_FetchInt(hndl, 78); - g_aStats[client].MATCH_LOSE = SQL_FetchInt(hndl, 79); - g_aStats[client].FB = SQL_FetchInt(hndl, 80); - g_aStats[client].NS = SQL_FetchInt(hndl, 81); - g_aStats[client].NSD = SQL_FetchInt(hndl, 82); - g_aStats[client].SMOKE = SQL_FetchInt(hndl, 83); - g_aStats[client].BLIND = SQL_FetchInt(hndl, 84); - g_aStats[client].AF = SQL_FetchInt(hndl, 85); - g_aStats[client].ATF = SQL_FetchInt(hndl, 86); - g_aStats[client].ATK = SQL_FetchInt(hndl, 87); - g_aStats[client].WALL = SQL_FetchInt(hndl, 88); + g_aStats[client].C4_PLANTED = SQL_FetchInt(hndl, 75); + g_aStats[client].C4_EXPLODED = SQL_FetchInt(hndl, 76); + g_aStats[client].C4_DEFUSED = SQL_FetchInt(hndl, 77); + g_aStats[client].CT_WIN = SQL_FetchInt(hndl, 78); + g_aStats[client].TR_WIN = SQL_FetchInt(hndl, 79); + g_aStats[client].HOSTAGES_RESCUED = SQL_FetchInt(hndl, 80); + g_aStats[client].VIP_KILLED = SQL_FetchInt(hndl, 81); + g_aStats[client].VIP_ESCAPED = SQL_FetchInt(hndl, 82); + g_aStats[client].VIP_PLAYED = SQL_FetchInt(hndl, 83); + g_aStats[client].MVP = SQL_FetchInt(hndl, 84); + g_aStats[client].DAMAGE = SQL_FetchInt(hndl, 85); + g_aStats[client].MATCH_WIN = SQL_FetchInt(hndl, 86); + g_aStats[client].MATCH_DRAW = SQL_FetchInt(hndl, 87); + g_aStats[client].MATCH_LOSE = SQL_FetchInt(hndl, 88); + g_aStats[client].FB = SQL_FetchInt(hndl, 89); + g_aStats[client].NS = SQL_FetchInt(hndl, 90); + g_aStats[client].NSD = SQL_FetchInt(hndl, 91); + g_aStats[client].SMOKE = SQL_FetchInt(hndl, 92); + g_aStats[client].BLIND = SQL_FetchInt(hndl, 93); + g_aStats[client].AF = SQL_FetchInt(hndl, 94); + g_aStats[client].ATF = SQL_FetchInt(hndl, 95); + g_aStats[client].ATK = SQL_FetchInt(hndl, 96); + g_aStats[client].WALL = SQL_FetchInt(hndl, 97); + //LogMessage("Number of fields in result: %d", SQL_HasResultSet(hndl)); } else { char query[10000]; char sEscapeName[MAX_NAME_LENGTH * 2 + 1];