diff --git a/discord_verificiation/scripting/include/unloze_playtime.inc b/discord_verificiation/scripting/include/unloze_playtime.inc index 16c9392..fd653fb 100755 --- a/discord_verificiation/scripting/include/unloze_playtime.inc +++ b/discord_verificiation/scripting/include/unloze_playtime.inc @@ -22,3 +22,4 @@ native int GetPlayerWorthRTV_boost_(int client); */ forward void GetPlayerHoursServer(int client, int hours, int minutes); +forward void GetPlayerTier(int client, int tier); diff --git a/discord_verificiation/scripting/unloze_player_time.sp b/discord_verificiation/scripting/unloze_player_time.sp index 3369edb..12b0f77 100644 --- a/discord_verificiation/scripting/unloze_player_time.sp +++ b/discord_verificiation/scripting/unloze_player_time.sp @@ -20,6 +20,7 @@ int g_iAvgHour_Contribution_per_player; int g_iPlayerTier[MAXPLAYERS + 1]; static Handle g_hForwardPlayerHours; +static Handle g_hForwardPlayerTier; public Plugin myinfo = { @@ -147,6 +148,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char [] error, int err_ma CreateNative("GetPlayerWorthRTV_boost_", Native_GetPlayerWorthRTV_boost); g_hForwardPlayerHours = CreateGlobalForward("GetPlayerHoursServer", ET_Ignore, Param_Cell, Param_Cell, Param_Cell); + g_hForwardPlayerTier = CreateGlobalForward("GetPlayerTier", ET_Ignore, Param_Cell, Param_Cell); return APLRes_Success; } @@ -231,6 +233,7 @@ public void OnPluginEnd() if (g_h_time_activity != null) delete g_h_time_activity; CloseHandle(g_hForwardPlayerHours); + CloseHandle(g_hForwardPlayerTier); } public void SQL_OnDatabaseConnect(Database db, const char[] error, any data) @@ -413,7 +416,10 @@ public void SetPlayerTier(int client) } while (kv.GotoNextKey(false)); - PrintToChat(client, "Your Player Tier is %i", g_iPlayerTier[client]); + Call_StartForward(g_hForwardPlayerTier); + Call_PushCell(client); + Call_PushCell(g_iPlayerTier[client]); + Call_Finish(); delete kv; }