timeban
#1

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;} 
when i connecting to the server send unban message to me but i set Timeban in file true and Bantime = 9999999999 plz help me.
Reply
#2

Show the ban command.
Reply
#3

i set this in player file without command but not work.
Reply
#4

Your code is wrong.
Reply
#5

where?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)