Offline Ban
#1

So i've created a offline ban system, now i wonder how can i create something that will sheck if the value `Banovan` is already at 1 and if it is command will not proceed.

pawn Код:
public OfflineBan(resultid, extraid, name[], razlog[])
{
    new szRows, szFields, query[178], ip[17], str[128];
    cache_get_data(szRows, szFields);
   
    switch(resultid)
    {
        case THREAD_OFFBAN:
        {
            if(szRows)
            {
                format(query, sizeof(query), "UPDATE `Igraci` SET `Banovan` = '1' WHERE `Ime` = '%s'", name);
                mysql_function_query(konekt, query, true, "OnQueryFinish", "i", THREAD_OSTALO);
               
                GetPlayerIp(extraid, ip, sizeof(ip));
               
                format(query, sizeof(query), "INSERT INTO `Banovi` (`Igrac`, `Admin`, `Razlog`, `Vreme`, `IP`) VALUES ('%s', '%s', '%s', '%s', '%s')", name, ImeIgraca(extraid), razlog, TimeDate(), ip);
                mysql_function_query(konekt, query, true, "OnQueryFinish", "ii", THREAD_OSTALO, extraid);
               
                format(str, sizeof(str), "Server: Admin %s je banovao(offline) racun igraca %s", ImeIgraca(extraid), name);
                SAM(TOMATO, str);
            }
            else
            {
                format(query, sizeof(query), "Racun igraca '%s' ne postoji, proverite da li ste upisali ime pravilno !", name);
                SCM(extraid, TOMATO, query);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Offline Ban - by ShoortyFl - 13.06.2014, 23:45
Re: Offline Ban - by SilentSoul - 14.06.2014, 00:17
Re: Offline Ban - by ShoortyFl - 14.06.2014, 00:21
Re: Offline Ban - by SilentSoul - 14.06.2014, 00:30
Re: Offline Ban - by ShoortyFl - 14.06.2014, 00:36
Re: Offline Ban - by SilentSoul - 14.06.2014, 00:38
Re: Offline Ban - by ShoortyFl - 14.06.2014, 00:39
Re: Offline Ban - by SilentSoul - 14.06.2014, 00:42
Re: Offline Ban - by ShoortyFl - 14.06.2014, 00:45

Forum Jump:


Users browsing this thread: 1 Guest(s)