/slap command
#6

Try This

Код:
CMD:slapid(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >=4)
	{
		new string[128], giveplayerid;
		if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /slapid [playerid]");

		new Float:shealth;
		new Float:slx, Float:sly, Float:slz;

		if(IsPlayerConnected(giveplayerid))
		{

			GetPlayerHealth(giveplayerid, shealth);
			SetPlayerHealth(giveplayerid, shealth-5);
			GetPlayerPos(giveplayerid, slx, sly, slz);
			SetPlayerPos(giveplayerid, slx, sly, slz+5);
			PlayerPlaySound(giveplayerid, 1130, slx, sly, slz+5);
			format(string, sizeof(string), "AdmCmd: %s was slapped by %s",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
			ABroadCast(COLOR_LIGHTRED,string,2);

		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
Reply


Messages In This Thread
/slap command - by [D]ry[D]esert - 08.05.2012, 15:03
Re: /slap command - by [D]ry[D]esert - 08.05.2012, 16:19
Re: /slap command - by doreto - 08.05.2012, 16:24
Re: /slap command - by [D]ry[D]esert - 08.05.2012, 16:27
Re: /slap command - by Kindred - 08.05.2012, 16:28
Re: /slap command - by DamienWalter - 15.05.2012, 12:37
Re: /slap command - by ricardo178 - 15.05.2012, 12:49

Forum Jump:


Users browsing this thread: 5 Guest(s)