Author Topic: Please help me ant teamkill  (Read 2970 times)

0 Members and 1 Guest are viewing this topic.

Offline Balys

  • Street Thug
  • *
  • Posts: 4
    • View Profile
Please help me ant teamkill
« 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

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Please help me ant teamkill
« Reply #1 on: June 05, 2013, 06:46:34 pm »
in server.cfg
[pawn]friendlyfire 1 // friendlyfire 0[/pawn]

 :o

Offline [Saint]

  • Made Man
  • ***
  • Posts: 126
  • Pawn scripting for SA:MP and VC:MP
    • View Profile
    • vk.com/vicecitymultiplayer
Re: Please help me ant teamkill
« Reply #2 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]
« Last Edit: June 06, 2013, 09:17:22 pm by [Saint] »


Russian Сommunity

Вступайте в группу: vk.com/vicecitymultiplayer

My profile on sa-mp.com

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
Re: Please help me ant teamkill
« Reply #3 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