How to make /healme command
#3

Well, here's the CMD and I've added one more system that if player already got full health he will get a message saying "You already have full health".
PHP код:
CMD:healme(playerid,params[])
{
    new 
Float:health;
    
GetPlayerHealth(playerid,health);
    if(
health == 100.0) return SendClientMessage(playerid, -1"Your health is already full.");
    if(
GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, -1"You do not enough cash.");
    
SetPlayerHealth(playerid100.0);
    
SendClientMessage(playerid, -1"You have healed yourself for 500$.");
    
GivePlayerMoney(playerid, -500);
    return 
1;

Reply


Messages In This Thread
How to make /healme command - by Immortal99 - 14.08.2016, 13:06
Re: How to make /healme command - by Stinged - 14.08.2016, 13:11
Re: How to make /healme command - by LifeRah - 14.08.2016, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)