so.. let me just check, you are sure of this command?
pawn Код:
CMD:heal(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsAMedic(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to be a Medic to use this command.");
//until here i get it, but this is strange
SetPlayerHealth(playerid, 100);//you set your own health?
SetPlayerMoney(playerid, -45);//you take away money from yourself?
SendClientMessage(playerid, COLOR_GREY, "You have healed %s for 45$.");//%s in a sendclientmessage? this won't work as you want..
return 1;
}
Use this command:
pawn Код:
CMD:heal(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsAMedic(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to be a Medic to use this command.");
new id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /heal <playerid>");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed by a Medic!");
SendClientMessage(playerid, 0x00FF00AA, "You have healed the player.");
return 1;
}
use this one, and tell me what happens