diff options
| author | navewindre <nw@moneybot.cc> | 2023-12-03 04:36:03 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-12-03 04:36:03 +0100 |
| commit | 38f1140c11724da05a23a10385061200b907cf6e (patch) | |
| tree | 0a25c91da964e8b64c8584cd53f847679f317f46 /sourcemod-1.5-dev/scripting/ljstats.sp | |
| parent | 2cb2a356c012cc34af811f26e16d26b11e663768 (diff) | |
stats
Diffstat (limited to 'sourcemod-1.5-dev/scripting/ljstats.sp')
| -rw-r--r-- | sourcemod-1.5-dev/scripting/ljstats.sp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sourcemod-1.5-dev/scripting/ljstats.sp b/sourcemod-1.5-dev/scripting/ljstats.sp index e9d535b..8167430 100644 --- a/sourcemod-1.5-dev/scripting/ljstats.sp +++ b/sourcemod-1.5-dev/scripting/ljstats.sp @@ -17,7 +17,7 @@ #define LJTOP_DIR "configs/ljstats/" #define LJTOP_FILE "ljtop.txt" -#define LJTOP_NUM_ENTRIES 500 +#define LJTOP_NUM_ENTRIES 1024 #define LJSOUND_NUM 5 #define MAX_STRAFES 50 #define BHOP_TIME 0.3 @@ -33,7 +33,7 @@ #define BJ_HEIGHT_DELTA_MAX 2.0 #define LAJ_HEIGHT_DELTA_MIN -6.0 #define LAJ_HEIGHT_DELTA_MAX 0.0 -#define JB_HEIGHT_DELTA_MIN -4 +#define JB_HEIGHT_DELTA_MIN -4.0 #define JB_HEIGHT_DELTA_MAX 1.0 #define HUD_HINT_SIZE 256 #define STRAFE_TRAINER_TICKS 9 @@ -680,8 +680,8 @@ public DB_LoadLJTop_Callback(Handle:owner, Handle:hndl, String:error[], any:pack if(it[iTable] > LJTOP_NUM_ENTRIES - 1) { - LogError("Too many rows for table %s", table); - return; + //LogError("Too many rows for table %s", table); + continue; } if (iTable == -1) @@ -1158,7 +1158,8 @@ public OnClientCookiesCached(client) GetClientCookie(client, g_hCookieLJEnabled, strCookie, sizeof(strCookie)); - g_PlayerStates[client][bLJEnabled] = bool:StringToInt(strCookie); + g_PlayerStates[client][bLJEnabled] = true; + //g_PlayerStates[client][bLJEnabled] = bool:StringToInt(strCookie); GetClientCookie(client, g_hCookieBlockMode, strCookie, sizeof(strCookie)); g_PlayerStates[client][bBlockMode] = bool:StringToInt(strCookie); @@ -1208,8 +1209,8 @@ ShowSettingsPanel(client) AddMenuItem(hMenu, "tpmenu", "Show TP menu"); - Format(buf, sizeof(buf), "LJ stats: %s", g_PlayerStates[client][bLJEnabled] ? "On" : "Off"); - AddMenuItem(hMenu, "ljenabled", buf); + Format(buf, sizeof(buf), "Show top stats"); + AddMenuItem(hMenu, "ljtop", buf); Format(buf, sizeof(buf), "Beam: %s", g_PlayerStates[client][bBeam] ? "On" : "Off"); AddMenuItem(hMenu, "beam", buf); @@ -1273,11 +1274,9 @@ public SettingsMenuHandler(Handle:hMenu, MenuAction:ma, client, nItem) if(!strcmp(strInfo, "tpmenu")) { Command_CheckpointPanel(client, 0); } - else if(!strcmp(strInfo, "ljenabled")) + else if(!strcmp(strInfo, "ljtop")) { - g_PlayerStates[client][bLJEnabled] = !g_PlayerStates[client][bLJEnabled]; - SetCookie(client, g_hCookieLJEnabled, g_PlayerStates[client][bLJEnabled]); - PrintToChat(client, "LJ stats are now %s", g_PlayerStates[client][bLJEnabled] ? "on" : "off"); + DisplayMenu(g_hLJTopMainMenu, client, MENU_TIME_FOREVER); ShowSettingsPanel(client); } else if(!strcmp(strInfo, "beam")) @@ -2044,7 +2043,7 @@ LJTopLoad(const String:strPath[]) if(nEntry >= LJTOP_NUM_ENTRIES) { - PrintToServer("[LJTop] Too many entries for table %d; ignoring line", nTable); + //PrintToServer("[LJTop] Too many entries for table %d; ignoring line", nTable); continue; } |
