SA-MP Forums Archive
Medic class - 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: Medic class (/showthread.php?tid=455820)



Medic class - FireWarrior101 - 03.08.2013

Ok guys add the title says medic class
i am making a medic class but i dont know the Special command to heal players
im making this for teams so that the player can heal his own team members for 1 score also i need a 60 s timer




Re: Medic class - FireWarrior101 - 03.08.2013

ZZZ
so will i have to do medic thing for all the teams like
If(pTeam(playerid) = TEAM_USA)
and ill have to create this 6 times ?


Re: Medic class - FireWarrior101 - 03.08.2013

Bump


Re: Medic class - FireWarrior101 - 03.08.2013

I want to make medic class heal his team
how do i do this so please mention it
Bump


Re: Medic class - FireWarrior101 - 04.08.2013

Asking someone to guide me to make a medic heal command so medic class can heal team members
zzzzzzzZZZZZzzzzZzZZ


Re: Medic class - jamesbond007 - 04.08.2013

#define CLASS_MEDIC 1

new pClass[MAX_PLAYERS];

//inside /heal
if( pClass[playerid]==CLASS_MEDIC)
{
// keep doing other stuff here


Re: Medic class - FireWarrior101 - 04.08.2013

i want to make team heal not player heal i get that


Re: Medic class - RajatPawar - 04.08.2013

EDIT: nvm


Re: Medic class - arjanforgames - 04.08.2013

Heal all medics:

pawn Код:
CMD:heal(playerid, params[])
{
       foreach(new i: Player);
       {
              if(pClass[i]  == CLASS_MEDIC)
              {
                     SetPlayerHealth(i, 100);
              }
       }
}

ZCMD and Foreach required.


Re: Medic class - FireWarrior101 - 04.08.2013

can you explain the function of foreach