Stupid question
#2

directly from the sa-mp wiki

Код:
dcmd_ban(playerid, params[])
{
	new
		id,
		reason[64];
	if (sscanf(params, "uz", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/ban <playerid/partname> <reason (optional)>\"");
	else if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough admin.");
	else
	{
	 
		BanEx(id, reason);
		format(reason, sizeof (reason), "You have been banned%s%s.", reason[0] ? (" for: ") : (""), reason);
		SendClientMessage(id, 0xFF0000AA, reason);
		SendClientMessage(playerid, 0x00FF00AA, "Player banned");
	}
	return 1;
}
Reply


Messages In This Thread
Stupid question - by typedef - 11.05.2009, 01:50
Re: Stupid question - by CJ101 - 11.05.2009, 02:01
Re: Stupid question - by typedef - 11.05.2009, 02:25

Forum Jump:


Users browsing this thread: 1 Guest(s)