/heal <id>
#1

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

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;
}
Reply
#3

== 1 is id 1 skin?
Reply
#4

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)