[HELP] offban reason
#1

Hello everyone I have command /offban and that all work's but how can I when offban player connect to the server then he get message of ban reason how can I read from file someone player ban reason. If you know what I mean?Thanks

this is check if player offban

pawn Код:
new lokacija[128],rzl[128],PlayerName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
            format(lokacija,128,"Banovi/%s.ini",PlayerName[playerid]);
            if(fexist(lokacija))
            {
                ClearChatbox(playerid, 40);
                SCM(playerid,0xDB023EFF,"G-Protect: {FFFFFFVas account je trenutno iskljucen sa servera! Izbaceni ste!");
                SCMF(playerid,BELA,"G-Protect: Razlog bana: %s",rzl);
                KickWithMessage(playerid);
            }
Reply
#2

If in the Banovi/UserFile.ini its only ban reason.

pawn Код:
new lokacija[128],rzl[128],PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
format(lokacija,128,"Banovi/%s.ini",PlayerName);
if(fexist(lokacija))
{
    new File:iUser = fopen(PlayerName, io_read);
    fread(iUser, rzl);
    fclose(iUser);
    ClearChatbox(playerid, 40);
    SCM(playerid, 0xDB023EFF, "G-Protect: {FFFFFFVas account je trenutno iskljucen sa servera! Izbaceni ste!");
    SCMF(playerid, BELA, "G-Protect: Razlog bana: %s",rzl);
    KickWithMessage(playerid);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)