Y_ini help with my ban system
#3

PHP код:
function LoadAcc(playerid)
{
    
NameCheck(playerid);
    if(
fexist(UserPath(playerid)))
    {
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
            
INI_ParseFile(IPPath(playerid), "LoadIPBan_%s", .bExtra true, .extra playerid);
        if(!
strcmp(RPIP(playerid), pInfo[playerid][pIP]))
        {
             
BanCheck(playerid);
            if(
tInfo[playerid][ClearLog] == 0)
            {
                
SendClientMessage(playerid,COL_NOTIFY,"Your account has been automatically logged in.");
                
SendClientMessage(playerid,-1,"{F52C2C}=========================================================");
                
SendClientMSG(playerid,-1,"{F52C2C}[MOTD]:{D17777} %s",MOTDInfo[MOTDstr]);
                
SendClientMessage(playerid,-1,"{F52C2C}=========================================================");
                if(
pInfo[playerid][Email] == 0)
                {
                    
SendClientMessage(playerid,COL_NOTIFY,"Your account doesn't have an assigned Email Address. Use /assignemail to link one to this account.");
                    
SendClientMessage(playerid,COL_NOTIFY,"This Email Address will only be used for account recovery purposes ONLY.");
                }
             }
        }
        else
          {
            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"...Login...",""COL_WHITE"This account is registered.Please enter your password below","Login","Quit");
           }
    }
    else
    {
         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,""COL_WHITE"...Registration...",""COL_WHITE"To register this account please enter your desired password below.","Register","Quit");
    }
    return 
1;
}
//banchecks here
        
if(fexist(IPPath(playerid)))
        {
            
tInfo[playerid][ClearLog] = 1;
            
SendClientMessage(playeridCOLOR_SERVER"Your account has been IP Banned from the server.");
            
SendClientMessage(playeridCOL_ERROR,"============"SERVER_NAME"=============");
            
SendClientMSG(playeridCOLOR_SERVER,"Account Name: %s(ID:%d) ",ReturnPlayerName(playerid),playerid);
            
SendClientMSG(playeridCOLOR_SERVER,"IP Address: %s ",RPIP(playerid));
            
SendClientMSG(playeridCOLOR_SERVER,"Banned By: %s ",IPinfo[IPBannedBy]);
            
SendClientMSG(playeridCOLOR_SERVER,"Banned Date: %s ",IPinfo[IPBannedDate]);
            
SendClientMSG(playeridCOLOR_SERVER,"Reason: %s ",IPinfo[IPBannedRea]);
            
SendClientMessage(playeridCOL_ERROR,"======================================");
            
SendServerMSG(COLOR_SERVER,"%s(ID:%d) has been kicked from the server. [Reason: IP Banned] ",ReturnPlayerName(playerid),playerid);
            
GameTextForPlayer(playerid"~r~Banned",2500,3);
            
SetTimerEx("KickPlayer",50,false,"d",playerid);
        }
//the update version
functionLoadIPBan(playerid,name[],value[])
{
    
INI_String("IPBannedBy",IPinfo[IPBannedBy],64);
    
INI_String("IPBannedRea",IPinfo[IPBannedRea],128);
    
INI_String("IPBannedDate",IPinfo[IPBannedDate],128);
    return 
1;

Reply


Messages In This Thread
Y_ini help with my ban system - by Leaky - 22.08.2018, 05:25
Re: Y_ini help with my ban system - by Leaky - 23.08.2018, 07:41
Re: Y_ini help with my ban system - by Leaky - 24.08.2018, 06:43
Re: Y_ini help with my ban system - by Leaky - 26.08.2018, 01:21
Re: Y_ini help with my ban system - by Leaky - 27.08.2018, 04:17
Re: Y_ini help with my ban system - by KinderClans - 27.08.2018, 08:16
Re: Y_ini help with my ban system - by Leaky - 27.08.2018, 08:57

Forum Jump:


Users browsing this thread: 1 Guest(s)