how do i do this?
#2

By using SetPlayerTeam, I think it works as an anti-teamkill too. Or else, you could try something like this:
pawn Код:
new team1[MAX_PLAYERS], team2[MAX_PLAYERS]; //Creating two team global variables.

public OnPlayerTakeDamage(playerid, issueried, Float:amount, weaponid)
{
  if(Team1[issuerid] == 1 && Team1[playerid] == 1)  //If issuer and the player is in same team.
  {
    new Float:hp[MAX_PLAYERS];
    GetPlayerHealth(playerid, hp[playerid]);
    SetPlayerHealth(playerid, hp[playerid]); //So, here it gives balance and the player won't die.
   }
  return 1;
}
//I believe this could work.
Reply


Messages In This Thread
how do i do this? - by Deaglez - 10.11.2012, 02:14
Re: how do i do this? - by Lordzy - 10.11.2012, 02:35
Re: how do i do this? - by Deaglez - 10.11.2012, 02:56
Re: how do i do this? - by Lordzy - 10.11.2012, 06:34

Forum Jump:


Users browsing this thread: 2 Guest(s)