Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Balys on June 05, 2013, 05:11:58 pm

Title: Please help me ant teamkill
Post by: Balys on June 05, 2013, 05:11:58 pm
Hello,

I need an ant team kill, I do not know to create, but I had an idea, example: tommys gang, are orange id1, ai the tommys can not kill the

skins that are the color orange would be the id 1 which is the tommys color, ie the characters of tommy are going to be all orange, do not

go there they could kill themselves.

If someone could help me thank you

thank you
Title: Re: Please help me ant teamkill
Post by: MatheuS on June 05, 2013, 06:46:34 pm
in server.cfg
[pawn]friendlyfire 1 // friendlyfire 0[/pawn]

 :o
Title: Re: Please help me ant teamkill
Post by: [Saint] on June 06, 2013, 09:15:20 pm
anti-team kill #2

[pawn]public OnPlayerDeath(playerid, killerid, reason, bodypart)
{

   if (killerid != INVALID_PLAYER_ID) // if player killed by any other player
   {
                       if ( GetPlayerTeam(playerid) == GetPlayerTeam(killerid)  )
                       {
                                 SetPlayerHealth(killerid, 0.0);
                                 SendClientMessage(killerid, 0xFFFFFFFF, "SERVER: Team Kill it BAD!l");
                       }

              }


          return 1;
}[/pawn]
Title: Re: Please help me ant teamkill
Post by: MatheuS on June 06, 2013, 11:29:27 pm
anti-team kill #2

[pawn]public OnPlayerDeath(playerid, killerid, reason, bodypart)
{

   if (killerid != INVALID_PLAYER_ID) // if player killed by any other player
   {
                       if ( GetPlayerTeam(playerid) == GetPlayerTeam(killerid)  )
                       {
                                 SetPlayerHealth(killerid, 0.0);
                                 SendClientMessage(killerid, 0xFFFFFFFF, "SERVER: Team Kill it BAD!l");
                       }

              }


          return 1;
}[/pawn]

good  ;D