ban system
#1

If banned player in my server trying to connect all the server shut down automaticlly, it's happen already to someone here?
waiting for answer

HTML Code:
	if(dini_Int(file, "pBanned") == 1)
	{
	    SetPlayerName(playerid, "BannedPlayer");
	    SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You are banned from this server. (Make a ban appeal at www.bcrp.tk)");
        AddBan(playerid);
        Kick(playerid);
	    return 1;
	}
	return 1;
}
Reply
#2

Try replacing the if line with:
Code:
if(PlayerInfo[playerid][pBanned] == 1)
Reply
#3

Quote:
Originally Posted by XpoZzA
View Post
Try replacing the if line with:
Code:
if(PlayerInfo[playerid][pMedLic] == 1)
didn't work bro XD
Reply
#4

post addban function
Reply
#5

IMPORTANT If you want to use [pBanned] you should load the user before the ban is showed to him. And remove changing name to banned player it's not needed player will be kicked anyway
Reply
#6

First of all, DINI is pretty bad compared to y_INI and MySQL.
Secondly, make sure that pBanned is actually 1. Sometimes it might be the bantime instead and you can check if a player is not banned by checking if the value is 0. If the value is anything different to 0, they're banned.
Reply
#7

Yeah Iam using y_Ini for years
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)