SA-MP 0.3c R3-1 sscanf problem
#1

i've upgraded my server to R3-1, but i have problem with sscanf.
none command what require player id doesn't work.

example:
pawn Code:
CMD:kick(playerid, params[])
{
    if(PI[playerid][Admin] > 0 || IsPlayerAdmin(playerid))
    {
        new id, razlog[64];
        if(sscanf(params, "us[64]", id, razlog)) return SCM(playerid, GRAD3, "Koristite: {BFC0C2}/kick [Korisnicki ID ili Ime igraca] [Razlog]");
        if(!IsPlayerConnected(id)) return SCM(playerid, GRAD2, "(greska) Taj igrac je offline!");
        if(PI[playerid][Admin] < HEAD && PI[id][Admin] >= HEAD) return SCM(playerid, GRAD2, "(greska) Ne mozete koristiti ovu komandu na headadminu!");
        new hIme[MAX_PLAYER_NAME];
        new hIme2[24];
        new strport[150];
        RPIme(id, hIme);
        RPIme(playerid, hIme2);
        format(strport, sizeof strport, "|{FFFFFF}GM{FF0000}| {FFFFFF}%s {FF0000}je izbacen od admina %s. Razlog: {FFFFFF}%s.", hIme, hIme2, razlog);
        StaffPoruka(CRVENA, strport);
        format(strport, sizeof strport, "|{FFFFFF}GM{FF0000}| Izbaceni ste od admina {FFFFFF}%s. {FF0000}Razlog: %s.", hIme2, razlog);
        SendClientMessage(id, CRVENA, strport);
        Kick(id);
        new ip[16], logstring[256];
        GetPlayerIp(playerid, ip, sizeof ip);
        format(logstring, sizeof logstring, "| Komanda: /kick | Izvrsio: %s | Igrac: %s | Razlog: %s | Vrsta: Direktna | IP: %s", hIme2, hIme, razlog, ip);
        UpisiLog(FAJL_KICKLOG, logstring);
    }
    return 1;
}

this command was working with all previous versions, but no with R3-1.
the problem is that if i type /kick 10 spamming, it will not kick ID 10, but ID 0.
Reply
#2

The dev team changed something, and Y_Less doesn't know what they did. so your best bet is to wait until Y_Less finds a solution or wait till the dev team reverts/fix it
Reply
#3

I did wonder why some of my commands broke in the new server update...

The best workaround for this at the moment, is to use R2, until it gets fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)