HELP WITH MYSQL TEMP BAN
#1

Hi can i request for help for my temp ban im using event scheduler but it wont unban automaticaly but if you guys can suggest or give some temp ban scripts it would be good or can you help me with this
PHP Code:
CMD:ban(playeridparams[])
{
    if(
Player[playerid][Admin] >= 2)
    {
        new
            
query[256],
            
ip[16],
            
reason[50],
            
string[64]
        ;
        new 
banner[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME], target;
        
GetPlayerName(playeridbannersizeof(banner));
        
GetPlayerName(targetPlayerNamesizeof(PlayerName));
        
GetPlayerIp(targetipsizeof(ip));
        if(
sscanf(params"rs[50]"targetreason)) return SendClientMessage(playerid,0xAA3333AA,"USAGE:/ban(Name)(reason)");
        
mysql_format(MySQL:mysqlquerysizeof(query), "INSERT INTO `bans`(`player`, `ip`, `admin`,`reason`) VALUES('%s', '%e', '%e', '%s')"targetipbannerreason);
        
mysql_tquery(MySQL:mysqlquery"""");
        
mysql_format(MySQL:mysqlquery256"DROP EVENT IF EXISTS `%e`"target);
        
mysql_tquery(MySQL:mysqlquery"""");
        
mysql_format(MySQL:mysqlquerysizeof(query), "CREATE EVENT `%e` ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 Minute DO DELETE FROM `bans` WHERE `bans`.`player` = '%e'"targettarget);
        
mysql_tquery(MySQL:mysqlquery"""");
        
format(stringsizeof(string), "ADMIN BAN:%s has been banned reason: %s"targetreason);
        
SendClientMessageToAll(0xFF22EE00string);
    }
    return 
1;

thanks
Reply


Messages In This Thread
HELP WITH MYSQL TEMP BAN - by XoMoX - 10.01.2020, 18:53
Re: HELP WITH MYSQL TEMP BAN - by Calisthenics - 10.01.2020, 19:29
Re: HELP WITH MYSQL TEMP BAN - by Joe Staff - 10.01.2020, 19:35
Re: HELP WITH MYSQL TEMP BAN - by XoMoX - 10.01.2020, 19:49
Re: HELP WITH MYSQL TEMP BAN - by Calisthenics - 10.01.2020, 19:53
Re: HELP WITH MYSQL TEMP BAN - by XoMoX - 10.01.2020, 19:56
Re: HELP WITH MYSQL TEMP BAN - by Calisthenics - 10.01.2020, 20:00
Re: HELP WITH MYSQL TEMP BAN - by Radless - 10.01.2020, 21:35
Re: HELP WITH MYSQL TEMP BAN - by XoMoX - 11.01.2020, 00:41
Re: HELP WITH MYSQL TEMP BAN - by XoMoX - 11.01.2020, 00:53

Forum Jump:


Users browsing this thread: 1 Guest(s)