ban system - 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: ban system (
/showthread.php?tid=663721)
ban system -
REmixs1 - 09.02.2019
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;
}
Re: ban system -
XpoZzA - 09.02.2019
Try replacing the if line with:
Code:
if(PlayerInfo[playerid][pBanned] == 1)
Re: ban system -
REmixs1 - 09.02.2019
Quote:
Originally Posted by XpoZzA
Try replacing the if line with:
Code:
if(PlayerInfo[playerid][pMedLic] == 1)
|
didn't work bro XD
Re: ban system -
Florin48 - 09.02.2019
post addban function
Re: ban system -
TokicMajstor - 09.02.2019
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
Re: ban system -
Proxus - 09.02.2019
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.
Re: ban system -
TokicMajstor - 09.02.2019
Yeah Iam using y_Ini for years