this method is not really protecting something because changing the server time will bypass it,
but anyway.
PHP Code:
Usage: checkForTimeLicense( { 29, 11, 2017 }, "The plugin is no longer valid." ); // Plugin is valid until the 29/11/2017. ( inside OnPluginStart ).
PHP Code:
stock void checkForTimeLicense(int[] time, const char[] Error)
{
int timeNum = GetTime();
char times[3][5];
FormatTime(times[0], 5, "%d", timeNum); // day
FormatTime(times[1], 5, "%m", timeNum); // month
FormatTime(times[2], 5, "%Y", timeNum); // year
int timesf = time[0] + time[1] * 30 + time[2] * 365;
timeNum = StringToInt(times[0]) + StringToInt(times[1]) * 30 + StringToInt(times[2]) * 365;
if( timesf - timeNum < 0 )
{
SetFailState(Error);
}
}