Will this work? +1 REp!
#1

I'am kinda confused if this will work.

Код:
CMD:kick(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		new string[128], giveplayerid, reason[64];
		if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid/partofname] [reason]");

		if(IsPlayerConnected(giveplayerid))
		{
			if(PlayerInfo[giveplayerid][pAdmin] < PlayerInfo[playerid][pAdmin]) {
				new playerip[32];
				GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
				format(string, sizeof(string), "AdmCmd: %s (IP:%s) was kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), playerip, GetPlayerNameEx(playerid), reason);
				Log("logs/kick.log", string);
				format(string, sizeof(string), "AdmCmd: %s was kicked by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
				SendClientMessageToAllEx(COLOR_LIGHTRED, string);
				format(string, sizeof(string), "You have been kicked by %s, reason: %s. Take a screenshot using F8 if you find this abusive.", GetPlayerNameEx(playerid), reason);
				SendClientMessageEx(COLOR_LIGHTBLUE, string);
				SetTimerEx("DelayedKick", 1000, false, "i", giveplayerid);
			}
			return 1;
		} else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
	}

	return 1;
}
I don't know if that will send the msg to the victim and not to admin who uses it. The red colored code. Correct me if i'am wrong. +1 REP!
Reply


Messages In This Thread
Will this work? +1 REp! - by ChuckyBabe - 23.04.2015, 13:36
Re: Will this work? +1 REp! - by BleverCastard - 23.04.2015, 13:42
Re: Will this work? +1 REp! - by Konstantinos - 23.04.2015, 13:42
Re: Will this work? +1 REp! - by Jimmy0wns - 23.04.2015, 13:43
Re: Will this work? +1 REp! - by ChuckyBabe - 23.04.2015, 13:44
Re: Will this work? +1 REp! - by BroZeus - 23.04.2015, 13:45
Re: Will this work? +1 REp! - by De4dpOol - 23.04.2015, 13:45
Re: Will this work? +1 REp! - by ChuckyBabe - 23.04.2015, 13:48
Re: Will this work? +1 REp! - by iSkyline - 23.04.2015, 13:52
Re: Will this work? +1 REp! - by BleverCastard - 23.04.2015, 14:03

Forum Jump:


Users browsing this thread: 1 Guest(s)