Anyone Please Help Me With /banip - /unbanip
#1

I Am using Luxadmin System
im creating a server . i Expect Some people To tell me to use /rcon banip (ip) But i won't Give the rcon to all admins as u know . And the luxadmin console contains only unbanip . so
Can you guys help me In doing /banip and /unbanip . Thanks!
I Will +rep the One Who helps me
Reply
#2

This is my /banip cmd

Код:
CMD:banip(playerid, params[])
{
	if(IsPlayerConnected(playerid)) {
		new string[128], tmp[32];
		if(sscanf(params, "s[32]", tmp)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /banip [ip]");
		if(PlayerInfo[playerid][pAdmin] >= 6) {
			AddBan(tmp);
			format(string, sizeof(string), "AdmCmd: %s has banned IP:%s", GetPlayerNameEx(playerid), tmp);
			ABroadCast(COLOR_LIGHTRED,string,2);
		} else {
			SendClientMessage(playerid, COLOR_GRAD2, "   You are not authorized to use that command !");
		}
	}
	return 1;
}
And this is my /unbanip cmd

Код:
CMD:unbanip(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 4 
	{
		if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /unbanip [ip]");
		if(IsValidIP(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "That is not a valid IP address!");

		new string[128], year, month,day;
		getdate(year, month, day);
		RemoveBan(params);
		format(string, 128, "AdmCmd: %s has unbanned IP %s", GetPlayerNameEx(playerid), params);
		ABroadCast(COLOR_LIGHTRED,string,2);
		format(string, sizeof(string), "AdmCmd: %s has unbanned IP %s (%d-%d-%d)", GetPlayerNameEx(playerid), params, month, day, year);
		Log("logs/ban.log", string);
		print(string);
	}

	return 1;
}
Reply
#3

Do it and if you have a problem, we'll help you
Reply
#4

can you do it With Dcmd plz? because luxadmin uses Dcmd
Thank you!
i rep u both already from now
Reply
#5

It's for you to do it, otherwise you'll never understand
Reply
#6

it didn't work Please any other examples?
Reply
#7

bump? I'll give +rep! please!
Reply
#8

I found 1 in dcmd..

EDIT: ah u need banip ...

PHP код:
dcmd_ban(playeridparams[])
{
    new
        
id,
        
reason[64];
    if (
sscanf(params"uz"idreason)) SendClientMessage(playerid0xFF0000AA"Usage: \"/ban <playerid/partname> <reason (optional)>\"");
    else if (
id == INVALID_PLAYER_IDSendClientMessage(playerid0xFF0000AA"Player not found");
    else
    {
        
BanEx(idreason);
        
format(reasonsizeof (reason), "You have been banned%s%s."reason[0] ? (" for: ") : (""), reason);
        
SendClientMessage(id0xFF0000AAreason);
        
SendClientMessage(playerid0x00FF00AA"Player banned");
    }
    return 
1;

Reply
#9

please /unbanip?

dcmd_unbanip?

Luxadmin plz now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)