09.12.2018, 11:47
You forgot the return for the command and you added 2 params in the sscanf's quotes and only one after them (targetid)! Also you don't need to check the player's health in your case!
Try this:
CMD:heal(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Perdorimi: /heal [ID]");
else SetPlayerHealth(playerid, 100-hpmomentale);
return 1;
}
Try this:
CMD:heal(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Perdorimi: /heal [ID]");
else SetPlayerHealth(playerid, 100-hpmomentale);
return 1;
}