13.03.2014, 20:09
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) ==0)
{
new Float:Health,str[128];
GetPlayerHealth(playerid, Health);
if (Health < 50.0)
{
SendClientMessage(playerid,0xD10000FF, "You are too low on health to heal yourself!");
return 1;
}
else
{
if(GetPlayerMoney(playerid) < 1000)
{
format(str,sizeof(str),"You haven't got enough money to heal yourself (Your money: $%i Needed: $1000)",GetPlayerMoney(playerid))
return SendClientMessage(playerid,0xD10000FF ,str);
}
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,0x009900FF,"You have healed yourself for $1000!");
GivePlayerMoney(playerid, -1000);
return 1;
}
}