Closing samp-server.exe
#1

Something about this command is not working i mean when i type for example /ban 0 bla blabla it wont ban / show text draws it just shows This command does not exist, for more commands type /help but when i type /ban 0 bla it bans idk why but it doesn't let reason to be spaced.


pawn Код:
CMD:ban(playerid, params[])
{
    if(PI[playerid][Admin] >= 3)
    {
        new id, reason[64], tdstr[256];
        if(sscanf(params, "us[64]", id, reason)) return SCM(playerid, WHITE, "Koristite: /ban [id igraca / deo imena] [reason]");
        if(strlen(reason) > 64) return SCM(playerid, TOMATO, "[RPF] {FFFFFF}Razlog nesme biti veci 64 slova.");
        if(!IsPlayerConnected(id)) return SCM(playerid, TOMATO, "[RPF] {FFFFFF}Taj igrac nije online.");

        SCMF(playerid, TOMATO, "[RPF] {FFFFFF} >> Banovali ste igraca {F3FF02}%s {FFFFFF}| Razlog: {F3FF02}%s {FFFFFF}| Vreme i Datum: {F3FF02}%s", ImeIgraca(id), razlog, TimeDate());

        format(tdstr, sizeof(tdstr), "vase ime: ~g~%s", ImeIgraca(id));
        TextDrawSetString(BanInfo2[id], tdstr);

        format(tdstr, sizeof(tdstr), "ime admina: ~p~%s", ImeIgraca(playerid));
        TextDrawSetString(BanInfo3[id], tdstr);

        format(tdstr, sizeof(tdstr), "razlog iskljucenja: ~r~%s", reason);
        TextDrawSetString(BanInfo4[id], tdstr);

        format(tdstr, sizeof(tdstr), "datum i vreme: ~b~%s", TimeDate());
        TextDrawSetString(BanInfo5[id], tdstr);

        TextDrawShowForPlayer(id, BanInfo0[id]);
        TextDrawShowForPlayer(id, BanInfo1[id]);
        TextDrawShowForPlayer(id, BanInfo2[id]);
        TextDrawShowForPlayer(id, BanInfo3[id]);
        TextDrawShowForPlayer(id, BanInfo4[id]);
        TextDrawShowForPlayer(id, BanInfo5[id]);

        new INI:File = INI_Open(UserPath(id));
        INI_SetTag(File,"data");
        INI_WriteInt(File, "Banovan", 1);
        INI_WriteString(File, "RazlogBana", reason);
        INI_Close(File);

        PI[id][Banovan] = 1;
        format(PI[id][RazlogBana], 50, "%s", reason);
        KikujIgraca(id);
    }
    else return SCM(playerid, TOMATO, "[RPF] {FFFFFF}Nemate ovlastenje za koriscenje ove komande.");
    return 1;
}
Reply


Messages In This Thread
Closing samp-server.exe - by ShoortyFl - 22.06.2015, 20:48
Re : Closing samp-server.exe - by KillerDVX - 22.06.2015, 20:52
Re: Closing samp-server.exe - by ShoortyFl - 22.06.2015, 20:54
Re : Closing samp-server.exe - by KillerDVX - 22.06.2015, 20:56
Re: Closing samp-server.exe - by ShoortyFl - 22.06.2015, 20:58
Re: Closing samp-server.exe - by Prokill911 - 22.06.2015, 21:03
Re : Closing samp-server.exe - by KillerDVX - 22.06.2015, 21:17
Re: Closing samp-server.exe - by ShoortyFl - 22.06.2015, 21:28

Forum Jump:


Users browsing this thread: 1 Guest(s)