26.07.2011, 21:15
i've upgraded my server to R3-1, but i have problem with sscanf.
none command what require player id doesn't work.
example:
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.
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.