My own /givehp playerid health
#1

Hello,

I made this command:

Код:
CMD:givehp(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_RED,".:: You are not authorized to use this command ::.");
	new targetid, str[128], Float:hpamount;
	if(sscanf(params, "uu", targetid, hpamount)) return SendClientMessage(playerid, COLOR_WHITE,"/givehp [PlayerID/PartofName] [Health Points]");
	if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
	SetPlayerHealth(targetid, hpamount);
	format(str, sizeof(str), "[ADMIN] %s given you health points(%d).", playerid, hpamount);
	SendClientMessage(targetid, COLOR_GREEN, str);
	return 1;
}
But, it doesn't show like who gave who the health points and doesn't show the health points, and it doesn't set the health .. Can you please fix it for me?
Reply


Messages In This Thread
My own /givehp playerid health - by Guitar - 21.08.2012, 13:50
Re: My own /givehp playerid health - by Gangster-rocks - 21.08.2012, 14:23
Re: My own /givehp playerid health - by Ronaldo_raul™ - 21.08.2012, 15:02
Re: My own /givehp playerid health - by Jochemd - 21.08.2012, 15:40
Re: My own /givehp playerid health - by Ronaldo_raul™ - 21.08.2012, 15:42

Forum Jump:


Users browsing this thread: 1 Guest(s)