forked from UNLOZE/sm-plugins
adding minute support from unloze playtime into discord message, entwatch, knifeban and spraymanager
This commit is contained in:
@@ -62,6 +62,7 @@ char g_sSprayHash[MAXPLAYERS + 1][16];
|
||||
char g_csSID[MAXPLAYERS + 1][65];
|
||||
|
||||
int g_iClientHoursNotFullFilled[MAXPLAYERS + 1];
|
||||
int g_iClientMinutesNotFullFilled[MAXPLAYERS + 1];
|
||||
int g_iClientToClientSprayLifetime[MAXPLAYERS + 1][MAXPLAYERS + 1];
|
||||
int g_iClientSprayLifetime[MAXPLAYERS + 1] = { 2, ... };
|
||||
int g_iSprayLifetime[MAXPLAYERS + 1];
|
||||
@@ -338,9 +339,10 @@ public void OnClientPostAdminCheck(int client)
|
||||
UpdateHideSprays();
|
||||
}
|
||||
|
||||
public void GetPlayerHoursServer(int client, int hours)
|
||||
public void GetPlayerHoursServer(int client, int hours, int minutes)
|
||||
{
|
||||
g_iClientHoursNotFullFilled[client] = hours;
|
||||
g_iClientMinutesNotFullFilled[client] = minutes;
|
||||
g_bFullFillHourRequirement[client] = g_iClientHoursNotFullFilled[client] > g_cvarHourRequirement.IntValue ? true : false;
|
||||
}
|
||||
|
||||
@@ -2277,7 +2279,7 @@ public Action HookDecal(const char[] sTEName, const int[] iClients, int iNumClie
|
||||
//check for an arbitrary amount of hours before allowing spraying
|
||||
if (!g_bFullFillHourRequirement[client])
|
||||
{
|
||||
PrintToChat(client, "\x01\x04[SprayManager]\x01 You cannot spray because you dont have enough play time yet. (\x04%i/\x04%i\x01 hours)", g_iClientHoursNotFullFilled[client], g_cvarHourRequirement.IntValue);
|
||||
PrintToChat(client, "\x01\x04[SprayManager]\x01 You cannot spray because you dont have enough play time yet. (You have \x04%i Hours and \x04%i minutes. You need \x04%i\x01 hours)", g_iClientHoursNotFullFilled[client], g_iClientMinutesNotFullFilled[client], g_cvarHourRequirement.IntValue);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
@@ -3329,6 +3331,7 @@ stock void ClearPlayerInfo(int client)
|
||||
g_bMarkedNSFWByAdmin[client] = false;
|
||||
g_bFullFillHourRequirement[client] = false;
|
||||
g_iClientHoursNotFullFilled[client] = 0;
|
||||
g_iClientMinutesNotFullFilled[client] = 0;
|
||||
}
|
||||
|
||||
stock void UpdateClientToClientSprayLifeTime(int client, int iLifeTime)
|
||||
|
||||
Reference in New Issue
Block a user