[HELP] ban line
#1

Hello how can make this. I have offline command check for player stats and I have regular ban (/ban) and the offline ban /offban so I wonder how can make when I check player and if he has a offline or regular ban then in the one line it print me example if he has offline ban then it says player has offline ban or if he has a regular ban then it says the player is banned and one morer thing if player was not banned thhen it says on that line that player is not banned? Thanks. I hope that you will understand what I want.Thanks again
Reply
#2

If possible paste your offline /stats command and let me base the code on it.
Reply
#3

pawn Код:
CMD:provjeri(playerid, params[])
{
    if(PlayerInfo[playerid][Admin] < 1337) return SCM(playerid,-1,"{FFFFFF}[{F81414}G-Unit{FFFFFF}] {C3C3C3}Samo Admini!");
    new banstatus[128],imestr[128],imezz[128];
    if(sscanf(params,"s[128]i",imezz))
    {
        SCM(playerid,GRAD2,"{FFAF00}Koristite: {FFFFFF}/provjeri [Ime_Prezime] [Vrsta provjere (1-2)]");
        SCM(playerid, GRAD2,"*Napomena: Ime je osjetljivo na mala i velika slova, i takodjer mora da sadrzava donju crtu.");
        return 1;
    }
    if(IsPlayerConnected(ReturnUser(imezz))) return SCM(playerid,0xDB023EFF,"[!!!] Taj igrac je online!");
        format(imestr, sizeof(imestr),"/Users/%s.ini",imezz);
        if(!fexist(imestr)) return SCMF(playerid,0xDB023EFF,"G-Protect:Neuspjesno! Nick %s ne postoji",imezz);
        INI_ParseFile(imestr,"getStats",.bExtra = true, .extra = playerid);
        if(Promenljive[playerid][6] == 0) banstatus = "{FFFF66}Igrac nije banan...";
        else if(Promenljive[playerid][6] == 1) banstatus = "[!!!Taj je igrac banan!!!] Razlog bana:";
        else banstatus = "N/A";
        SCMF(playerid,BELA,"G-Protect: provjera igraca %s je pokrenuta...",imezz);
        SCMF(playerid,COLOR_ZUTA1,"Level:[%d] AdminLV[%d] GSLevel[%d] PayDayova[%d]",Promenljive[playerid][0],Promenljive[playerid][1],Promenljive[playerid][2],Promenljive[playerid][4]);
        SCMF(playerid,COLOR_ZUTA1,"Zadnja aktivnost: %s Admin/GS Aktivnost: %d minuta",Promenjivestring[playerid][0],Promenljive[playerid][5]);
        if(Promenljive[playerid][6] == 0)
        {
            SCMF(playerid,0xDB023EFF,"%s",banstatus);
        }
        else if(Promenljive[playerid][6] == 1)
        {
            SCMF(playerid,0xDB023EFF,"%s %s",banstatus,OffBanReasonPromenjivestring[playerid][0]);
        }
    else return SCM(playerid, GRAD2,"{F81414}[Greska!] {C3C3C3}Nepoznata vrsta provjere!");
    return 1;
}
for know it is jut for offline ban
Reply
#4

Please anyone? Thanks
Reply
#5

https://sampforum.blast.hk/showthread.php?tid=388612

Tutorial.
Reply
#6

I just want If player have offline or regular ban that it be writen on the just one line not two lines just one

pawn Код:
if(Promenljive[playerid][6] == 0)
        {
            SCMF(playerid,0xDB023EFF,"%s",banstatus);
        }
        else if(Promenljive[playerid][6] == 1)
        {
            SCMF(playerid,0xDB023EFF,"%s %s",banstatus,OffBanReasonPromenjivestring[playerid][0]);
        }
this is just for offline ban line and I want on that same line and regular ban
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)