offline ban
#1

I have a cmd /offban.. But, that command isn't work.

And I have a two errors in that cmd:

errors:

pawn Код:
(38321 -- 38322) : error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)

cmd:

pawn Код:
CMD:offban(playerid, params[])
{
    new ime[128], razlog[128], string[128];
    new giveplayer[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] < 1338)return SendClientMessage(playerid, COLOR_GRAD1,"Nisi autoriziran za ovu komandu");
    if(sscanf(params, "s[128]s[128]", ime, razlog))return SendClientMessage(playerid, COLOR_GRAD1," Koristi: /offban razlog");
    new fak[30];
    format(fak,sizeof(fak),ime);
    new INI:iniFile = INI_Open(fak);
    if(!fexist(fak))
    {   format(string, sizeof(string), "[ZEROAS]{FFFFFF} %s je banan od admina: %s!!![offline ban] Razlog: %s!", ime, PlayerName(playerid), razlog);
        SendAdminMessage( COLOR_MUTERED, string);
        new Query [300];
                         //  new  name[ MAX_PLAYER_NAME ]; // create a name string
                        // GetPlayerName(id, name, sizeof(name));
                         
                         format(Query,sizeof(Query),"UPDATE `KORISNICI` SET BANNED = '%d' WHERE `IME` = '%s' COLLATE NOCASE",
                                                                                        GetPVarInt(ime, "banan"),
                                                                                        DB_Escape(ime)); // Gather the name of the player then escape it.


                                                                                        db_query(Database, Query);
                                                                                        SetPVarInt(ime, "banan", 1);
        new File:lFile = fopen("Logovi/Banani.txt", io_append),
       
        logData[512],
        fyear, fmonth, fday,
        fhour, fminute, fsecond;
        getdate(fyear, fmonth, fday);
        gettime(fhour, fminute, fsecond);
        format(logData, sizeof(logData),"[%02d/%02d/%04d %02d:%02d:%02d] %s je dao offban igracu %s, Razlog: %s \r\n", fday, fmonth, fyear, fhour, fminute, fsecond, PlayerName(playerid), ime, razlog);
        fwrite(lFile, logData);
        fclose(lFile);
    }
    return 1;
}
Reply
#2

Can you give me these 2 lines, on what are these errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)