Disable help
#1

Ok, I have a account disable system. How can I make it where disables are removed automatically after the time is up like

PHP код:
dcmd_disable(playerid,params[])
{
    new 
id,days,reason[128];
     if(
sscanf(params"uds[128]"iddaysreason)) return SendClientMessage(playeridCOLOR_RED"USAGE: /disable id reason");
    else
   {
     
playerinfo[id][disabled] =1;
     
playerinfo[id][disabledays] =days;
     
SendClientMessage(playerid,-1,"You have been disabled.");
     
Kick(playerid);
   }
    return 
1;

I use yini for accounts
Reply
#2

Make two option in user's account file 'AccountDisableDate' & 'AccountDisableRe' then set a script if the 'AccountDisableDate' matches with the current date of the day then set the 'AccountDisableRe' to 0.

Код:
AccountDisableDate is used to have date of the day to remove account disable.
AccountDisableRe is used to know if account is disabled or not.
[EDIT]

Oh i almost forgot, add some changes in disable command too.
Add a y_ini script to set AccountDisableDate and AccountDisableRe in user's account file.
At last, you may kick player or not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)