07.04.2016, 17:58
PHP код:
public OnPlayerConnect(playerid){
new file[256];format(file,sizeof(file),UserFile,PlayerName(playerid));
if(dini_Exists(file)){
if(bool:dini_Bool(file,"Timeban")==true){
if(gettime()<dini_Int(file,"Bantime")){
new str[256];format(str,sizeof(str),"You have been temporary banned from the server by admin %s for %s.%d second(s) remaining",dini_Get(file,"Adminban"),dini_Get(file,"Reasonban"),dini_Int(file,"Bantime")-gettime());
SendClientMessage(playerid,COLOR_RED,str),SetTimerEx("KickPlayer",100,false,"i",playerid);
return 0;}
if(gettime()>dini_Int(file,"Bantime"))dini_BoolSet(file,"Timeban",false),dini_IntSet(file,"Bantime",0),SendClientMessage(playerid,COLOR_RED,"You have been unbanned.");}
ShowPlayerDialog(playerid,LoginDialog,DIALOG_STYLE_PASSWORD,""#COL_GREEN"Login",""#COL_WHITE"Your account has been "#COL_GREEN"registered "#COL_WHITE"in the system.\nEnter your password below for login in to your account.","Login","Cancel");}
else ShowPlayerDialog(playerid,RegisterDialog,DIALOG_STYLE_INPUT,""#COL_GREEN"Register",""#COL_WHITE"Your account is not "#COL_RED"registered "#COL_WHITE"in the system.\nEnter your password below for create new account.","Register","Cancel");
return 1;}