SA-MP Forums Archive
/heal <id> - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /heal <id> (/showthread.php?tid=456802)



/heal <id> - SampzzonE - 07.08.2013

how can i make if x is a medic and can heal team mates? (only team mates) (not need to heal myself)


Re: /heal <id> - Amel_PAtomAXx - 07.08.2013

pawn Код:
CMD:heal(playerid, params[])
{
    new id, Float:ammount;
    if (sscanf(params, "uf", id, ammount)) return SendClientMessage(playerid,0xFFFFFFFF, "USAGE: /heal playerid health");
    else if(!pInfo[playerid][Medic] == 1/*Just an example, you have to sync with your own system */) return SendClientMessage(playerid,0xFFFFFFFF, "You are not a medic.");
    else if(GetPlayerTeam(playerid) != GetPlayerTeam(id)) return SendClientMessage(playerid, 0xFFFFFFFF, "You can only heal your team mates.");
    else {
        SetPlayerHealth(id, ammount);
    }
    return 1;
}



Re: /heal <id> - SampzzonE - 07.08.2013

== 1 is id 1 skin?


Re: /heal <id> - Amel_PAtomAXx - 07.08.2013

Quote:
Originally Posted by SampzzonE
Посмотреть сообщение
== 1 is id 1 skin?
No, "==" means check.


Re: /heal <id> - FUDDS - 07.08.2013

Lol
I think he means "does the following mean they are skin/class ID 1?"

pawn Код:
else if(!pInfo[playerid][Medic] == 1