heal command
#1

Hey,

i have this code:
pawn Код:
CMD:heal(playerid,params[])
{
    new pID;
    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(GetPlayerHealth(pID) == 100) SendClientMessage(playerid,COLOR_YELLOW,"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(playerid)) 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
    {
    SetPlayerHealth(pID,100);
    GivePlayerMoney(playerid,1000);
    GivePlayerMoney(pID,-1000);
    SendClientMessage(playerid,COLOR_YELLOW,"You have healed %s");
    SendClientMessage(pID,COLOR_YELLOW,"You have been healed by %s for $1000");
    }
    return 1;
}
but for some reason the GetPlayerHealth isn't right as i get this:
Код:
C:\Users\Admin\Desktop\SAMP\Midnight Drifts\pawno\MaddMikesCNR.pwn(88) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply


Messages In This Thread
heal command - by Michael[NBK] - 24.10.2011, 18:52
Re: heal command - by [HiC]TheKiller - 24.10.2011, 18:55
Re: heal command - by Michael[NBK] - 24.10.2011, 18:57
Re: heal command - by [HiC]TheKiller - 24.10.2011, 19:05
Re: heal command - by Michael[NBK] - 24.10.2011, 19:06

Forum Jump:


Users browsing this thread: 1 Guest(s)