Ban won't work?
#8

Tried everything, still won't work? I just can't figure out what's wrong...
Here is the script again if you need it:

Код:
CMD:ban(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
	    new PID;
	 	new reason[64]; //the reason, put into a string
	  	new str[128]; //a new message string max 128
	  	new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
	  	GetPlayerName(playerid, Adminname, sizeof(Adminname));
	  	GetPlayerName(PID, Playername, sizeof(Playername));
	  	if(sscanf(params, "us[64]", PID, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /ban [id] [reason]");
		if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR] The player is not connected!");
		format(str, sizeof(str), "[BAN] '%s' has been banned by admin '%s'. Reason: %s ", Playername, Adminname, reason);
	 	SendClientMessageToAll(COLOR_ACHIEVEMENT, str);
		Ban(PID);
 	}else{
		SendClientMessage(playerid, COLOR_ERROR, "[ERROR] Only admins can use this command. Use /help.");
	}
	return 1;
}
Reply


Messages In This Thread
Ban won't work? - by jNkk - 23.12.2012, 13:59
Re: Ban won't work? - by SiRbEaSt - 23.12.2012, 14:01
Re: Ban won't work? - by jNkk - 23.12.2012, 14:12
Re: Ban won't work? - by SiRbEaSt - 23.12.2012, 14:14
Re: Ban won't work? - by YoYo123 - 23.12.2012, 14:43
Re: Ban won't work? - by TheSecrets - 23.12.2012, 15:41
Re: Ban won't work? - by ViruZz - 23.12.2012, 16:22
Re: Ban won't work? - by jNkk - 23.12.2012, 18:58
Re: Ban won't work? - by Konstantinos - 23.12.2012, 19:21

Forum Jump:


Users browsing this thread: 2 Guest(s)