Ban system fail. - 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 fail. (
/showthread.php?tid=599432)
Ban system fail. -
KillerDVX - 25.01.2016
Hello guys.
I've scripted a ban system, which we can get the name of admin who has banned us.
But when, I connect to the server, i got :
"You are banned from the server", which is the normal SA-MP message.
My definition is under the OnPlayerConnect :
PHP код:
if(NameBanned[playerid] == 1)
{
INI_Load("/bans/%s.ini");
format(string,sizeof(string),"{74F569}[BANNI] : {FFFFFF}Vous avez йtй banni par: {FF0000}%s, {FFFFFF}Raison: {FF0000}%s.",banned[playerid][adminbanning],banned[playerid][reason_banned]);
SendClientMessage(playerid,COLOR_ADMIN,string);
Banning[playerid] =1;
SetTimer("BanPlayer",700,0);
return 1;
}
Hope getting advices as soon as possible.
- KillerDVX.
Re: Ban system fail. -
-CaRRoT - 25.01.2016
Try kicking the player instead of banning him and setting the variable to 1.
Re: Ban system fail. -
Kwarde - 25.01.2016
When banning the player.. did you use the Ban() or BanEx() function? - Because don't in this case, for it'll be in the samp.ban list and nothing will be processed for him. Use Kick() instead.