i don't get what's wrong?
#5

Код:
dcmd_akill(playerid, params[])
{
  if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[AKILL])
  {
    new string[100];
    format(string, sizeof(string), "You must be Admin level %d to use that command!", gCommands[AKILL]);
    SendClientMessage(playerid, COLOUR_ORANGE, string);
		return 1:
  }
	new user;
  if(sscanf(params,"u",user))
	{
    SendClientMessage(playerid, COLOUR_ORANGE, "/akill [id/name]");
		return 1;
	}
	if(IsPlayerConnected(user) && user != playerid)
	{
		SetPlayerHealth(user, 0.0);
		new string[150];
		format(string, sizeof(string), "You have been admin-killed by an admin");
		SendClientMessage(user, COLOUR_ORANGE, string);
		format(string, sizeof(string), "You have successfully admin-killed player \'%s\'.", gPlayerInfo[user][PLAYER_NAME]);
		SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
	}
	else
		SendClientMessage(playerid, COLOUR_ORANGE, "You can not Akill yourself or a disconnected player.");
	return 1;
}
// As quickly written down, not tested for any typos. Adjust it as you please.
Reply


Messages In This Thread
i don't get what's wrong? - by pmk1 - 08.05.2010, 17:02
Re: i don't get what's wrong? - by [NYRP]Mike. - 08.05.2010, 17:04
Re: i don't get what's wrong? - by pmk1 - 08.05.2010, 17:08
Re: i don't get what's wrong? - by pmk1 - 13.05.2010, 21:22
Re: i don't get what's wrong? - by juice.j - 13.05.2010, 22:09
Re: i don't get what's wrong? - by pmk1 - 18.05.2010, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)