Un ban command
#3

Код:
CMD:adunban(playerid, params[])
{
   		new string[128];
	   	if(!strlen(params))
 		{
		   	format(string, sizeof(string), "[ERROR] {FFFFFF}USAGE:/adunban (Player Name)");
	  	   	SendClientMessage(playerid,COLOR_RED,string);
       		        return 1;
   		}
		if(!udb_Exists(params))
		{
	   		format(string, sizeof(string), "[ERROR] {FFFFFF}The player file %s is not found.",params);
	                SendClientMessage(playerid,COLOR_RED,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), "[ERROR] {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_RED,string);
	   	return 1;
}
i dont think it will work as i dont no much about converting saving systems but as far as i see it wont work due to this below

this here is the dub saving system if you wanted it as Y_INI you might wanna read up about dub and Y_INI

Checks user name banning
Код:
dUserSetINT(params).("Nameban", 0);
add this on enum pInfo just simply find it
Код:
PlayerInfo[ID][pBanned] =0;
Reply


Messages In This Thread
Un ban command - by nor15 - 25.04.2013, 20:57
Re: Un ban command - by RVRP - 25.04.2013, 21:52
Re: Un ban command - by Fredrick - 25.04.2013, 22:06
Re: Un ban command - by nor15 - 25.04.2013, 22:41
Re: Un ban command - by nor15 - 26.04.2013, 10:57

Forum Jump:


Users browsing this thread: 1 Guest(s)