21.08.2012, 13:50
Hello,
I made this command:
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?
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;
}


