Banning by days
#1

Hello, I've been making a ban command, but i wanted it so when you ban a player it bans them for 30 days, on the 30th day, it'll unban them, but I've looked through a lot of tutorials and couldn't find one that i was looking for, and when ever i try scripting one, it just ends up with errors.
If you could help I would be grateful.
Code:
Код:
ACMD:ban(playerid, params[])
{
	if (pInfo[playerid][Adminlevel] < 2)return 1;
	new reason[128], string[250];
	if(sscanf(params, "us[128]",ID, reason))
	return SCM(playerid, red, "--- /ban <ID> <Reason> ---");
    if(ID == IPI)return SCM(playerid, red, "Player is not connected!");
    pInfo[ID][Banned]=1;
    GetPlayerName(ID,pname,MAX_PLAYER_NAME);
    GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s %s has banned %s for %s", AdminLevelName(playerid),Nam, pname, reason);
   	SCMToAll(red, string);
   	Kick(ID);
   	return 1;
}
Reply


Messages In This Thread
Banning by days - by LeXuZ - 16.11.2014, 16:02
Re: Banning by days - by LeXuZ - 16.11.2014, 19:19
Re: Banning by days - by Abagail - 16.11.2014, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)