Ban/Unban thing
#1

Aight well I'm a starter at scripting.. so ye

I need to make it so that it saves the person's IP inside the ini folder, and when I use the ban command on that person's name, it bans the IP. And when I use the unban command, it unbans the IP (without being online, of course).

It'll probably be easy for most of you out there.. so be patient with me <3

/Ban command
Код:
COMMAND:ban(playerid,params[])
{
	new id,reason[80];
	if(PlayerInfo[playerid][pAdminLevel] <1) return SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command");
	if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE:/ban [playerid] [reason]");
	format(String,sizeof(String) ,"%s has been banned by admin %s. Reason: %s", Name[id], Name[playerid], reason);
	SendClientMessageToAll(COLOR_ORANGE, String);
	SendClientMessage(id, COLOR_RED, "You've been banned from the server.");
	Ban(id);
	return 1;
}
/Unban command
Код:
Wtf I do here <3
And finally the thingies from player files.
Код:
    PlayerInfo[playerid][pLevel]
    PlayerInfo[playerid][pAdminLevel]
    PlayerInfo[playerid][pScore]
    PlayerInfo[playerid][pCash]
    PlayerInfo[playerid][pWarns]
And no, it's not made by me.. I used an admin system already made a bit.
Reply


Messages In This Thread
Ban/Unban thing - by tarez - 13.08.2011, 16:33
Re: Ban/Unban thing - by Riddick94 - 13.08.2011, 17:26
Re: Ban/Unban thing - by tarez - 13.08.2011, 22:27
Re: Ban/Unban thing - by Kitten - 13.08.2011, 22:32
Re: Ban/Unban thing - by Raimis_R - 13.08.2011, 22:40
Re: Ban/Unban thing - by tarez - 13.08.2011, 22:41
Re: Ban/Unban thing - by Kitten - 13.08.2011, 22:44
Re: Ban/Unban thing - by tarez - 13.08.2011, 22:46
Re: Ban/Unban thing - by Raimis_R - 13.08.2011, 22:52
Re: Ban/Unban thing - by tarez - 13.08.2011, 22:56

Forum Jump:


Users browsing this thread: 2 Guest(s)