Problem With /ban
#1

Hi When i want ban some one like for 2 days adminwarn say player ... banned for 2 days reason ... but he/she can join server again this cmd just kick him but when not use days use 0 for Perementaly Ban He/she ban successfully can you help me to fix it?

when ban for days i see this on mysql_log.txt
PHP код:
[10:52:19] [ERRORCMySQLQuery::Execute[SendQuery] - (error #1054) Unknown column 'pBanDays' in 'field list' 
Reply
#2

You don't have pBanDays column in MySQL database, create it.
Reply
#3

Quote:
Originally Posted by Kinglee
Посмотреть сообщение
You don't have pBanDays column in MySQL database, create it.
i creat it on my user and banned database



Reply
#4

Change varchar to varchar(11) and try in your server again.
Reply
#5

Quote:
Originally Posted by Kinglee
Посмотреть сообщение
Change varchar to varchar(11) and try in your server again.
I do it Now but not work player join server again
Reply
#6

Quote:
Originally Posted by keyvanik
Посмотреть сообщение
I do it Now but not work player join server again
Show me your ban command code please.
Reply
#7

Quote:
Originally Posted by Kinglee
Посмотреть сообщение
Change varchar to varchar(11) and try in your server again.
Quote:
Originally Posted by keyvanik
Посмотреть сообщение
i creat it on my user and banned database



Quote:
Originally Posted by keyvanik
Посмотреть сообщение
I do it Now but not work player join server again
Quote:
Originally Posted by Kinglee
Посмотреть сообщение
Show me your ban command code please.
PHP код:
    if(!strcmp(cmd,"/ban",true))
    {
        if(
PlayerInfo[playerid][pAdmin] <= 3) return SCM(playerid,COLOR_YELLOW2,"Error: Shoma Admin Nisti");
        new 
Fullname[256];
        
Fullname strtok(cmdtext,idx);
        if(!
strlen(Fullname)) return SCM(playerid,COL_SYN,"Syntax: /ban <FullName> <Days(1-60 , 0= Perementaly Ban)> <UseIP(1=Yes 0=No)> <Reason>");
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp)) return SCM(playerid,COL_SYN,"Syntax: /ban <FullName> <Days(1-60 , 0= Perementaly Ban)> <UseIP(1=Yes 0=No)> <Reason>");
        new 
days strval(tmp);
        if(
days || days 60) return SCM(playerid,COLOR_ALI,"Type a day between 1 and 60.");
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp)) return SCM(playeridCOL_SYN"Syntax: /ban <FullName> <Days(1-60 , 0= Perementaly Ban)> <UseIP(1=Yes 0=No)> <Reason>");
        new 
UseIP strval(tmp);
        if(
UseIP != && UseIP != 0) return SCM(playeridCOLOR_ALI"UseIP must be 0 or 1");
        
tmp strtokEx(cmdtext,idx);
        if(!
strlen(tmp)) return SCM(playerid,COL_SYN,"Syntax: /ban <FullName> <Days(1-60 , 0= Perementaly Ban)> <UseIP(1=Yes 0=No)> <Reason>");
        
BanPlayer(playeridFullnamedaystmpUseIP);
        return 
1;
    } 
Reply
#8

Problem from MySQL database not ban cmd, I suggest delete it and create another one with same name.
Reply
#9

i have many users on this, delete?
Reply
#10

Just delete the pBanDays not the users and recreate it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)