Heal CMD
#8

Quote:
Originally Posted by Michael[NBK]
Посмотреть сообщение
pawn Код:
CMD:heal(playerid,params[])
{
    new pID;
    new Float:health;
    if(gTeam[playerid] == Medic) return SendClientMessage(playerid,COLOR_RED,"You must be a medic to use this command");
    else if(sscanf(params, "u", pID)) SendClientMessage(playerid,COLOR_YELLOW,"Please use /heal [playerid]");
    else if(GetPlayerHealthEx(pID) == 100) SendError(playerid,"This player is already full health");
    else if(PlayerFromPlayer(playerid,pID,4)) SendClientMessage(playerid,COLOR_YELLOW,"%s is not close enough to heal");
    else if(!IsPlayerConnected(pID)) SendClientMessage(playerid,COLOR_YELLOW,"That player is not connected!");
    else if(pID == playerid) SendClientMessage(playerid,COLOR_YELLOW,"You cannot use this command to heal your self");
    else
    {
    GetPlayerHealth(playerid,health);
    SetPlayerHealth(pID,100);
    GivePlayerMoney(playerid,(100-health)*10);
    GivePlayerMoney(pID,-((100-health)*10));
    SendClientMessageFormatted(playerid,COLOR_YELLOW,"You have healed %s", ReturnPlayerName(pID),pID);
    SendClientMessageFormatted(pID,COLOR_YELLOW,"You have been healed by %s", ReturnPlayerName(playerid),playerid);
    }
    return 1;
}
Код:
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\pawno\MaddMikesCNR.pwn(145) : warning 213: tag mismatch
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\pawno\MaddMikesCNR.pwn(146) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
It's:

Quote:
Originally Posted by =WoR=Varth
Посмотреть сообщение
pawn Код:
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(pID,100);
GivePlayerMoney(playerid,(100-floatround(health))*10);
GivePlayerMoney(pID,-((100-floatround(health))*10));
Reply


Messages In This Thread
Heal CMD - by Michael[NBK] - 25.10.2011, 16:04
Re: Heal CMD - by Kingunit - 25.10.2011, 16:07
Re: Heal CMD - by Gamer_Z - 25.10.2011, 16:12
Re: Heal CMD - by =WoR=Varth - 25.10.2011, 16:14
Re: Heal CMD - by Michael[NBK] - 25.10.2011, 16:15
Re: Heal CMD - by =WoR=Varth - 25.10.2011, 16:29
Re: Heal CMD - by Michael[NBK] - 25.10.2011, 16:30
Re: Heal CMD - by =WoR=Varth - 25.10.2011, 16:33
Re: Heal CMD - by Michael[NBK] - 25.10.2011, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)