23.06.2009, 06:23
well if you don't have medic script on your server do like this:
new cmd[256], tmp[256], idx;
if(strcmp(cmd, "/heal", true) == 0)
{
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if (!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Player isn't connected.");
if (otherplayer == playerid) return SendClientMessage(playerid, COLOR_WHITE, "You can't heal your self");
SetPlayerHealth(otherplayer, 100);
SendClientMessage(playerid, COLOR_WHITE, "You have filled the health");
return 1;
}
new cmd[256], tmp[256], idx;
if(strcmp(cmd, "/heal", true) == 0)
{
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if (!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Player isn't connected.");
if (otherplayer == playerid) return SendClientMessage(playerid, COLOR_WHITE, "You can't heal your self");
SetPlayerHealth(otherplayer, 100);
SendClientMessage(playerid, COLOR_WHITE, "You have filled the health");
return 1;
}