From SA-MP Team, 2 Years ago, written in SA-MP Pawn.
Embed
  1. public OnPlayerCommandText(playerid, cmdtext[])
  2. {
  3.         new index, cmd[20];
  4.         cmd = strtok(cmdtext, index);
  5.  
  6.         if (strcmp(cmd, "/heal", true) == 0)
  7.         {
  8.                 new tmp[20];
  9.                 tmp = strtok(cmdtext, index);
  10.                 if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Usage : /heal <ID>");
  11.                 if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  12.                 SetPlayerHealth(strval(tmp), 100.0);
  13.                 SendClientMessage(strval(tmp), 0x00FF00AA, "You have been healed");
  14.                 SendClientMessage(playerid, 0x00FF00AA, "Player healed");
  15.                 return 1;
  16.         }
  17.         return 0;
  18. }