24.08.2012, 17:11
Ok , i made some commands ex.
But heres the problem, everytime ID 0 uses the commands it returns to him , like :
MarkoN[0] reported MarkoN[1] , but i actually repoted Wolf, and when he repots me its normal
Wolf[1] repoted MarkoN[0]. idk could be a sscanf bug or something. I updated everything , even downloaded the R2 server, but no use, every command does it like that... I changed the u param to d , that didnt work eather, and heres the log.
pawn Код:
CMD:report(playerid, params[])
{
new id, ime[MAX_PLAYER_NAME], ime2[MAX_PLAYER_NAME], razlog[64], poruka[256], porukalog[256], IP[16], IP2[16];
GetPlayerIp(playerid, IP, sizeof(IP));
GetPlayerIp(id, IP2, sizeof(IP2));
GetPlayerName(playerid, ime, sizeof(ime));
GetPlayerName(id, ime2, sizeof(ime2));
if(iIgraca[playerid][Admin] < iIgraca[id][Admin]) return SendClientMessage(playerid, BOJA_CRVENA, "• Cant report and admin with higher level than you.");
if(sscanf(params, "ds[64]", id, razlog)) return SendClientMessage(playerid, BOJA_CRVENA, "• Error. Use /report) [ID] [reason]");
if(strlen(razlog) > 30) return SendClientMessage(playerid, BOJA_CRVENA,"• Reason is too long (Max. 30 letters)");
format(poruka, sizeof(poruka), "Report • %s[%d], %s[%d] Reason • %s", ime, playerid, ime2, id, razlog);
format(porukalog, sizeof(porukalog), "%s [IP : %d], reported %s [IP : %d] Razlog : %s", ime, IP, ime2, IP, razlog);
PosaljiPorukuAdminima(BOJA_ZLATNA, poruka); // sends admins the message
new File:Prijave;
Prijave = fopen("prijave.log", io_append);
fwrite(Prijave, porukalog);
fclose(Prijave);
SendClientMessage(playerid, BOJA_ЋUTA, "• Success. Youre message was logged, and sent to online administrators.");
return 1;
}
MarkoN[0] reported MarkoN[1] , but i actually repoted Wolf, and when he repots me its normal
Wolf[1] repoted MarkoN[0]. idk could be a sscanf bug or something. I updated everything , even downloaded the R2 server, but no use, every command does it like that... I changed the u param to d , that didnt work eather, and heres the log.
Код:
MarkoN [IP : 49] reported MarkoN [IP : 49] Reason : test Wolf [IP : 48] reported MarkoN [IP : 49] Reason : test