help with /unban [name] plz
#1

hi

i have 2 different bans system in my adminfilterscript.
1. /banacc = in the Playerfile "Banned=0" changes to "Banned=1"
2. the "normal" ban
now i tried to make a command /unban [name] to switch the "Banned=1" in the playerfile back to "Banned=0"
hope someone can help me
(i'm using dudb not dini)

greetings
Reply
#2

Copy and paste /banacc so there are 2.
Change "/banacc" to "/unban".
Change the bit which sets Banned to "1" so that it sets it to "0".

Does this not work?

You may also want to make sure that /banacc definatley doesn't ban them the "normal" way.
Reply
#3

no this doesn't work :/

here is the code:
Код:
dcmd_banacc(playerid,params[])
{
  if(PlayerData[playerid][Level] >= 1)
	{
	new grund[128],opfer;
	if(sscanf(params,"uz",opfer,grund)) return SendClientMessage(playerid, COLOR_SYSTEM, "Usage: /ban [playerid] [reason]");
	if (!IsPlayerConnected(opfer)) return SendClientMessage(playerid, COLOR_SYSTEM, "Invalid ID!");
	new pname[MAX_PLAYER_NAME], oname[MAX_PLAYER_NAME],string[128];
	GetPlayerName(playerid,pname,sizeof(pname)); GetPlayerName(opfer,oname,sizeof(oname));
	format(string,sizeof(string),"[Server] %s has been namebanned by Admin %s [Reason: %s]",oname,pname,grund);
	SendClientMessageToAll(COLOR_RED,string);
	PlayerData[opfer][Banned] = 1;
	Kick(opfer);
	return 1;
	}
	else return SendClientMessage(playerid,COLOR_RED,"Admins only!");
}
for this code i need a /unban [name] command
Reply
#4

anyone?
Reply
#5

It's not possible, also it's possible if you use MySQL as your database.
Reply
#6

oh okay :/
Reply
#7

why doesn't it work without a mysql databse?
Reply
#8

I managed to write my own /unban [name] command with dini account system...

It unbans a player who isn't connected to the server by editing their user file and unbanning their ip also
Reply
#9

do you or did you released it publicly yet?
Reply
#10

Easiest way to unban player is go to server folder and open samp.ban- file and remove line what player you want to ne unbanned
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)