08.06.2014, 19:08
Use getdate() function.
For example (it involves that you have something to save account data)
For example (it involves that you have something to save account data)
PHP код:
CMD:daysban(playerid, params[])
{
new days, account_name[25];
if(sscanf(params, "s[25]d", account_name, days)) return SCM(playerid, -1, "SYNTAX : /daysban [Account name] [Days]");
AccountInfo[playerid][DaysBanned] = getdate() + days;
return 1;
}
public OnPlayerConnect(playerid)
{
if(AccountInfo[playerid][DaysBanned] > getdate()) return SCM(playerid, -1, "You're still banned !");
return 1;
}