DIR Return Create A Forum - Home
---------------------------------------------------------
SF World Invasion
HTML https://sfworld.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Bug Reports
*****************************************************
#Post#: 805--------------------------------------------------
Unban Command Bug
DIR By: Mib_Mohaned
Date: August 2, 2013, 2:26 am
---------------------------------------------------------
Your name:[sK]Mib_Mohaned
Date and time where you found the bug:idk all admins level 3 use
it and its bugged
What is the bug?:/unban Bugged
Proof: All admins in the server know this bug and the owner too
Can you re-create the bug:(y/n)Yes
We can make a correct Command.
With dcmd:
dcmd command Define:
_________________________________________
--- Quote ---
> dcmd(unban,7,cmdtext);/// to unban player (dcmd define
command)
--- End Quote ---
__________________________________________
--- Code ---
dcmd_unban(playerid, params[])
{
new string[128];
if(!strlen(params))
{
format(string, sizeof(string), "USAGE: /unban (Full Player
Name)");
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}
if(!udb_Exists(params))
{
format(string, sizeof(string), "The player file %s is not
found.",params);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string, sizeof(string), "unbanip %s",
dUser(params).("IP"));
SendRconCommand(string);
format(string, sizeof(string), "reloadbans");
SendRconCommand(string);
new nameban = dUserINT(params).("Nameban");
if(nameban == 0)
{
format(string, sizeof(string), "{FFFFFF}The Player Name
%s is not banned.", params);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}
dUserSetINT(params).("Nameban", 0);
format(string, sizeof(string), "[ADMIN]%s has been unbanned
by %s",params,PlayerName(playerid));
printf("%s", string);
SendClientMessage(playerid,COLOR_ADMIN,string);
format(string, sizeof(string), "9[ADMIN] %s has been
unbanned %s",PlayerName(playerid),params);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
--- End Code ---
_________________________________
With Zcmds:
--- Code ---
CMD:unban(playerid, params[]) {
if (PlayerInfo[playerid][AdminLevel] >= 3) {
new PlayerFile[50];
if(sscanf(params, "u[50]",PlayerFile)) return
SendClientMessage(playerid, COLOR_RED, "USAGE: /unban
(FullName)");
if (!dini_Exists(PlayerFile)) return
SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not
registered.");
if (dini_Int(PlayerFile, "Banned") == 0) return
SendClientMessage(playerid, COLOR_RED, "ERROR: This Account Not
in ban-List");
dini_IntSet(PlayerFile, "Banned", 0);
format(szString, sizeof(szString), "Admin Has unban'%s'",
params);
SendClientMessage(playerid, COLOR_GREEN, szString);
format(szString, sizeof(szString), "Admin %s, (ID:%d) has
unbanned Account: %s", params);
SendClientMessageToAdmins(szString);
}
else {
return 0;
}
return 1;
--- End Code ---
________________________________
With dcmds Better ;) Work 100%
Ceridts:
Thanks For Dracoblue for dcmds.
Y-Less for sscanf.
Zcmd i will not give Ceridts its Suck dcmd better
Mohaned Zahran For make the command and Topic
If i forget you no proplem :P xD.
#Post#: 812--------------------------------------------------
Re: Unban Command Bug
DIR By: Jimmy
Date: August 2, 2013, 3:36 am
---------------------------------------------------------
You know you can't just get any command and it'll work right?
As I've seen from our CMD on ladmin, it should work properly,
sometimes it does, sometimes no.
I don't know why..
#Post#: 826--------------------------------------------------
Re: Unban Command Bug
DIR By: NoFeAr
Date: August 2, 2013, 4:36 am
---------------------------------------------------------
Well unban is Bug
#Post#: 839--------------------------------------------------
Re: Unban Command Bug
DIR By: Jimmy
Date: August 2, 2013, 4:50 am
---------------------------------------------------------
Well I know.
#Post#: 845--------------------------------------------------
Re: Unban Command Bug
DIR By: NoFeAr
Date: August 2, 2013, 4:57 am
---------------------------------------------------------
so can u fix
#Post#: 854--------------------------------------------------
Re: Unban Command Bug
DIR By: Jimmy
Date: August 2, 2013, 5:50 am
---------------------------------------------------------
That, I don't know :p
#Post#: 867--------------------------------------------------
Re: Unban Command Bug
DIR By: Amil
Date: August 2, 2013, 6:08 am
---------------------------------------------------------
we need irc
#Post#: 870--------------------------------------------------
Re: Unban Command Bug
DIR By: NoFeAr
Date: August 2, 2013, 6:17 am
---------------------------------------------------------
IRC Can Help with that ._.
#Post#: 893--------------------------------------------------
Re: Unban Command Bug
DIR By: Mib_Mohaned
Date: August 2, 2013, 9:55 am
---------------------------------------------------------
We can make IRC and connect Sa-mp-Ban Files to irc and make
command !unban and it will be very easy
#Post#: 897--------------------------------------------------
Re: Unban Command Bug
DIR By: NoFeAr
Date: August 2, 2013, 11:32 am
---------------------------------------------------------
Yea.....
*****************************************************
Page 1 of 3
DIR Next Page