Problem BanReason DINI
#3

It's good for me. Only there is a problem, the player leaves /q and changes from BanReason=None to BanReason=
Код:
CMD:ban(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		new string[256], id, reason[50];
		if(sscanf(params, "us[50]", id, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage /ban [ID] [Reason]");
		if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "There is no such player.");
		format(string, sizeof(string), "AdmCmd: %s has been banned from Admin %s, Reason: %s.", pName(id), pName(playerid), reason);
		SendClientMessageToAll(COLOR_LIGHTRED, string);
		format(PlayerInfo[playerid][pBanReason], 128, "%s", reason);
		PlayerInfo[id][pBanned] = 1;
		BanEx(id, reason);
	}
	else
	{
		SCM(playerid, -1, "You are not an administrator!");
	}
	return 1;
}
Reply


Messages In This Thread
Problem BanReason DINI - by KamilPolska - 15.04.2018, 11:46
Re: Problem BanReason DINI - by Mencent - 15.04.2018, 12:25
Re: Problem BanReason DINI - by KamilPolska - 15.04.2018, 13:47
Re: Problem BanReason DINI - by ProScripter - 15.04.2018, 15:34
Re: Problem BanReason DINI - by KamilPolska - 15.04.2018, 15:50
Re: Problem BanReason DINI - by ProScripter - 15.04.2018, 16:26
Re: Problem BanReason DINI - by KamilPolska - 15.04.2018, 17:30
Re: Problem BanReason DINI - by fiki574 - 15.04.2018, 17:41
Re: Problem BanReason DINI - by KamilPolska - 15.04.2018, 19:10
Re: Problem BanReason DINI - by MadeMan - 15.04.2018, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)