diff --git a/discord_verificiation/scripting/include/unloze_playtime.inc b/discord_verificiation/scripting/include/unloze_playtime.inc index fd653fb..e82ba60 100755 --- a/discord_verificiation/scripting/include/unloze_playtime.inc +++ b/discord_verificiation/scripting/include/unloze_playtime.inc @@ -21,5 +21,6 @@ native int GetPlayerWorthRTV_boost_(int client); * @int Game time minutes the client has on the server. */ +native int GetPlayerTier_native(int client); //just the clients tier 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 b5305e4..59464b1 100644 --- a/discord_verificiation/scripting/unloze_player_time.sp +++ b/discord_verificiation/scripting/unloze_player_time.sp @@ -225,6 +225,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char [] error, int err_ma { CreateNative("GetAveragePlayerTimeOnServer", Native_GetAveragePlayerActiveTimeServer); CreateNative("GetPlayerWorthRTV_boost_", Native_GetPlayerWorthRTV_boost); + CreateNative("GetPlayerTier_native", Native_GetPlayerTier); g_hForwardPlayerHours = CreateGlobalForward("GetPlayerHoursServer", ET_Ignore, Param_Cell, Param_Cell, Param_Cell); g_hForwardPlayerTier = CreateGlobalForward("GetPlayerTier", ET_Ignore, Param_Cell, Param_Cell); @@ -275,6 +276,23 @@ public int Native_GetAveragePlayerActiveTimeServer(Handle plugin, int numParams) return GetAveragePlayerActiveTimeServer(); } +public int Native_GetPlayerTier(Handle plugin, int numParams) +{ + int client = GetNativeCell(1); + if(client > MaxClients || client <= 0) + { + ThrowNativeError(SP_ERROR_NATIVE, "Client is not valid."); + return view_as(-1); + } + + if(!IsClientInGame(client)) + { + ThrowNativeError(SP_ERROR_NATIVE, "Client is not in-game."); + return view_as(-1); + } + return g_iPlayerTier[client]; +} + public int Native_GetPlayerWorthRTV_boost(Handle plugin, int numParams) { int client = GetNativeCell(1); @@ -801,6 +819,10 @@ public void PrintClientGroupOverrides(int client) char rtv_boost_tier[32]; Format(rtv_boost_tier, sizeof(rtv_boost_tier), "tier%i", g_iRtvBoost_tier); + + char spray_tier[32]; + Format(spray_tier, sizeof(spray_tier), "tier%i", FindConVar("sm_spraymanager_tier_required").IntValue); + for (int i = 0; i < groupCount; i++) { char groupName[64]; @@ -814,6 +836,10 @@ public void PrintClientGroupOverrides(int client) { PrintToChat(client, "tier%i access: %i mapvote/rtv/nomination boost", g_iRtvBoost_tier, g_iPlayerRTVCapacity); } + if (StrEqual(groupName, spray_tier)) + { + PrintToChat(client, "%s access: sprays",spray_tier ); + } if (g_GroupOverrides.GetString(groupName, overrides, sizeof(overrides))) { PrintToChat(client, "%s access: %s", groupName, overrides);