Team Killing (rep++)
#1

hey Guys.
==> My server is hosted so i want anti-team kill. Like if some player kill his own member than he will get warning and 3 warn=kick... Pleazzzzzzzzzz
Reply
#2

If you use SetPlayerTeam there is a native anti-team kill.
Reply
#3

I didn't understand. Can u clear it?? Please...
Reply
#4

Quote:
Originally Posted by MP2
Посмотреть сообщение
If you use SetPlayerTeam there is a native anti-team kill.
https://sampwiki.blast.hk/wiki/SetPlayerTeam
Reply
#5

hey omar just punt this line where u add teams: SetPlayerTeam(playerid, 0);
this will help u and u can change the numeric for different teams. this is anti team kill system.
Reply
#6

There are two ways to do this...
1) Use SetPlayerTeam
2)//Paste this under OnPlayerGiveDamage
pawn Код:
if(gTeam[killerid] == gTeam[playerid])
{
    new Float:h;
    GetPlayerHealth(damagedid,h);
    SetPlayerHealth(damagedid,h+amount);
}
Reply
#7

i adde setplayerteam at onplayer spawn?? So thats it??
Reply
#8

Not OnPlayerSpawn put it OnPlayerRequestClass
check the classid (the skinid) Ex. i have the CJ Skin which is Groove Street Leader
When player have CJ Skin use SetPlayerTeam

that is example only
Reply
#9

I have four classes. So i need to add 4 different setplayer team??
Reply
#10

if you already defined the team id you can just do like this

OnPlayerRequestClass:

pawn Код:
switch(classid)
{
   case 28, 29: //if player has skinid 28/29 player team will be set to TEAM_DRUG_DEALER
   {
      SetPlayerTeam(playerid, TEAM_DRUG_DEALER);
   }
}
That is example only.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)