Anyone Please Help Me With /banip - /unbanip -
Kells - 16.11.2014
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
Re: Anyone Please Help Me With /banip - /unbanip -
xWarrior - 16.11.2014
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;
}
Re : Anyone Please Help Me With /banip - /unbanip -
Dutheil - 16.11.2014
Do it and if you have a problem, we'll help you
Re: Anyone Please Help Me With /banip - /unbanip -
Kells - 16.11.2014
can you do it With Dcmd plz? because luxadmin uses Dcmd
Thank you!
i rep u both already from now
Re : Anyone Please Help Me With /banip - /unbanip -
Dutheil - 16.11.2014
It's for you to do it, otherwise you'll never understand
Re: Anyone Please Help Me With /banip - /unbanip -
Kells - 16.11.2014
it didn't work Please any other examples?
Re: Anyone Please Help Me With /banip - /unbanip -
Kells - 16.11.2014
bump? I'll give +rep! please!
Re: Anyone Please Help Me With /banip - /unbanip -
Glossy42O - 26.11.2014
I found 1 in dcmd..
EDIT: ah u need banip ...
PHP код:
dcmd_ban(playerid, params[])
{
new
id,
reason[64];
if (sscanf(params, "uz", id, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <playerid/partname> <reason (optional)>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
BanEx(id, reason);
format(reason, sizeof (reason), "You have been banned%s%s.", reason[0] ? (" for: ") : (""), reason);
SendClientMessage(id, 0xFF0000AA, reason);
SendClientMessage(playerid, 0x00FF00AA, "Player banned");
}
return 1;
}
Re: Anyone Please Help Me With /banip - /unbanip -
Tween73 - 19.03.2015
please /unbanip?
dcmd_unbanip?
Luxadmin plz now