Help with /heal command
#4

pawn Код:
if(Medic[playerid] == 1 || IsPlayerInVehicle(playerid, 416))
{
    SetPlayerHealth(id,100);
    new pName[24];
    new string[265];
    GetPlayerName(playerid,"pName",sizeof(pName));
    format(string,sizeof(string),"MEDIC:You got healed by Medic %s",pName);
    new Float:health, Float:h = 100 - health;
    GetPlayerHealth(id,health);
    SetPlayerHealth(id, health+h);
    SendClientMessage(id,0x00FF00AA,string);
}
The size of your string is also very unnecessary, like using a hangar for an RC plane.
Reply


Messages In This Thread
Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 09:13
Re: Help with /heal command - by Elorreli - 19.12.2010, 09:23
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 09:55
Re: Help with /heal command - by Elorreli - 19.12.2010, 10:05
Re: Help with /heal command - by Mean - 19.12.2010, 12:18
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 12:22
Re: Help with /heal command - by Mean - 19.12.2010, 13:10
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 13:18
Re: Help with /heal command - by Mean - 19.12.2010, 13:32
Re: Help with /heal command - by [JnA]DukeNukem - 19.12.2010, 13:36

Forum Jump:


Users browsing this thread: 9 Guest(s)