offline ban doest save banning - 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: offline ban doest save banning (
/showthread.php?tid=583309)
offline ban doest save banning -
morjan - 27.07.2015
hello when i try to offline ban someone i ban them but he still can come ingame and player that mean that offline ban didnt save.
soory for bad english
this si the code of offlineban:
Код:
CMD:bannick(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 2) {
new string[53],nickname[50], reason[48], adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, adminname, sizeof(adminname));
if(sscanf(params, "s[50]s[48]", nickname, reason)) return SCM(playerid, -1, "USAGE: /Bannick (Nickname) (Reason)");
format(string,sizeof(string),"{3BB023}» Admin action « {ABFF85}Admin %s has banned %s offline ban. (Reason: %s)",adminname,nickname,reason);
SendClientMessageToAll(red,string);
SaveToFile("BanLog",string);
CMDMessageToAdmins(playerid,"BANNICK");
format(string,sizeof(string),"/ladmin/bans/%s.sav", nickname);
return VBanNick(playerid,nickname,reason);
} else return SendClientMessage(playerid,red,"» Error « {BABABA}You are not authorized to use this command.");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
and this is VBanNick:
Код:
stock VBanNick(playerid,nick[],reason[])
{
format(Vnewban,32,BanDir,nick);
if(dini_Exists(Vnewban))
return SendClientMessage(playerid, ErrorColor,""COL_BLUE"This username is already banned.");
new giveid;
giveid = VBReturnUser(nick);
if(!IsPlayerConnected(giveid))
{
format(NICKBAN,20,nick);
format(Vnewban,32,BanDir,VBPlayer(giveid));
dini_Create(Vnewban);
return VBanSaveInfo(playerid,Vnewban,reason);
}
else
return VBanID(playerid,giveid,reason);
}
Re: offline ban doest save banning -
morjan - 27.07.2015
any one?
Re: offline ban doest save banning -
Moudix - 27.07.2015
Did you add something under OnPlayerConnect ? so he gets kicked if he's banned?