SA-MP Forums Archive
[HELP] offban reason - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] offban reason (/showthread.php?tid=462499)



[HELP] offban reason - Luca12 - 07.09.2013

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);
            }



Re: [HELP] offban reason - OxyG3N - 07.09.2013

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);
}