I dont get whats wrong?
#4

Код:
	CMD:ban(playerid, params[])
	{
		if(pInfo[playerid][Adminlevel] < 2)
		{
		new PID; //define the playerid we wanna ban
		new reason[64]; //the reason, put into a string
		new str[128]; //a new message string
		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_GREY, "USAGE: /kick [playerid] [reason]");

		if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");

		format(str, sizeof(str), "'%s' has been banned by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
		SendClientMessageToAll(COLOR_RED, str);
		Ban(PID);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "You have to be level 5 to use that command!");
		}
		return 1;
	}
This command is so fucking messed up, that I've only repaired { }.
Reply


Messages In This Thread
I dont get whats wrong? - by Goldino - 26.01.2013, 10:57
Re: I dont get whats wrong? - by ]Rafaellos[ - 26.01.2013, 10:59
AW: I dont get whats wrong? - by Blackazur - 26.01.2013, 11:00
Re: I dont get whats wrong? - by IgrexolonO - 26.01.2013, 11:01
AW: I dont get whats wrong? - by xOFxK1LLER - 26.01.2013, 13:48

Forum Jump:


Users browsing this thread: 1 Guest(s)