27.05.2011, 23:33
Take a look at this script: https://sampforum.blast.hk/showthread.php?tid=186695
So instead of "You have been banned from this server" you'll see "YOU ARE BANNED! Reason: {reason}"
I wouldn't use the include itself if I was you, because my server crashed once (only once) with it. Just take a look at the script and try to put it in your gamemode or filterscript.
pawn Code:
public rplayer_OnConnect(playerid)
{
new string[128], fstring[288], IP[16];
GetPlayerIp(playerid, IP, 16);
GetPlayerName(playerid, kPlayerName[playerid], MAX_PLAYER_NAME);
format(fstring, sizeof(fstring), "Bans/%s.ban", IP);
if(dini_Exists(fstring)){
format(string, sizeof(string), "YOU ARE BANNED! Reason: %s", dini_Get(fstring, "BanReason"));
SendClientMessage(playerid, COLOR_RED, string);
Kick(playerid);
return 1;
}
return 1;
}
I wouldn't use the include itself if I was you, because my server crashed once (only once) with it. Just take a look at the script and try to put it in your gamemode or filterscript.