Banip help
#7

Код:
COMMAND:banip(playerid, params[])
{
	new eReason [ 64 ], iReason[ 128 ], tmp[ 64 ], string[ 128 ];
	if(sscanf(params, "s[64]s[128]", eReason, iReason)) return SCP(playerid, "[IP Range][Reason]");

	format(tmp, sizeof(tmp), "banip %s", eReason);
	SendRconCommand(tmp);
	SendRconCommand("reloadbans");

	format(string, MAX_STRING, "4[ IPBAN ] IP address %s has been banned. Reason: %s", eReason, iReason);
	iEcho(string);
	return 1;
}
You need to specify string size within sscanf parameters even though it's specified.
Reply


Messages In This Thread
Banip help - by justjamie - 03.04.2016, 08:43
Re: Banip help - by justjamie - 03.04.2016, 09:21
Re: Banip help - by AndySedeyn - 03.04.2016, 09:26
Re: Banip help - by justjamie - 03.04.2016, 09:54
Re: Banip help - by iKevin - 03.04.2016, 09:57
Re: Banip help - by justjamie - 03.04.2016, 10:01
Re: Banip help - by Tingesport - 03.04.2016, 10:08
Re: Banip help - by justjamie - 03.04.2016, 10:53
Re: Banip help - by Karan007 - 03.04.2016, 11:02
Re: Banip help - by justjamie - 03.04.2016, 11:19

Forum Jump:


Users browsing this thread: 1 Guest(s)