every command is bugged
#2

Let me know if this works:
Код:
CMD:report(playerid, params[])
{
    new id, ime[MAX_PLAYER_NAME], ime2[MAX_PLAYER_AME], razlog[64], poruka[256], porukalog[256], IP[16], IP2[16];
    GetPlayerName(playerid, ime, sizeof(ime));
    if(iIgraca[playerid][Admin] < iIgraca[id][Admin]) return SendClientMessage(playerid, BOJA_CRVENA, "• Cant report and admin with higher level than you.");
    if(sscanf(params, "us[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;
}
Reply


Messages In This Thread
every command is bugged - by MarkoN - 24.08.2012, 17:11
Re: every command is bugged - by aintaro - 24.08.2012, 20:06
Re: every command is bugged - by MarkoN - 24.08.2012, 20:08
Re: every command is bugged - by Memoryz - 24.08.2012, 20:10
Re: every command is bugged - by MarkoN - 24.08.2012, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)