How do i put anti team kill in my GANGWAR SERVER?
#7

Quote:
Originally Posted by WeeD*
Quote:
Originally Posted by Johnson_boy
You can check when player dies if killer is in same team, and them do something for the killer.
Team mates will still be able to hurt each other, but if they kill player in same team then something happends.

Код:
if(gTeam[killerid] == gTeam[playerid]) {
Do something
}
well thanks but what do you mean by the " do something? " like can you make it for me so nothing happens.. like the health doesnt go down please
With do something i mean like you could get 1 score off from killer, kill the killer, jail the killer, etc...





Quote:
Originally Posted by [69
StreetGT ]
you can use i too,
i use it

Код:
 // Under OnPlayerDeath
 if(killerid == INVALID_PLAYER_ID) {

    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);

	} else {

    if(gTeam[killerid] != gTeam[playerid]) {

	  	// Valid kill

	  	SendDeathMessage(killerid,playerid,reason);
		SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
		GivePlayerMoney(killerid, 1000);
Checking if killer is invalid playerid is not necessary in samp 0.3.
So this part is not needed:
Код:
if(killerid == INVALID_PLAYER_ID) {
  SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
Reply


Messages In This Thread
How do i put anti team kill in my GANGWAR SERVER? - by Arsham7 - 11.03.2010, 20:25
Re: How do i put anti team kill in my GANGWAR SERVER? - by lameguy - 11.03.2010, 20:37
Re: How do i put anti team kill in my GANGWAR SERVER? - by StreetGT - 11.03.2010, 20:37
Re: How do i put anti team kill in my GANGWAR SERVER? - by Arsham7 - 11.03.2010, 20:40
Re: How do i put anti team kill in my GANGWAR SERVER? - by StreetGT - 11.03.2010, 20:42
Re: How do i put anti team kill in my GANGWAR SERVER? - by StreetGT - 11.03.2010, 20:47
Re: How do i put anti team kill in my GANGWAR SERVER? - by lameguy - 12.03.2010, 11:27
Re: How do i put anti team kill in my GANGWAR SERVER? - by biltong - 12.03.2010, 13:32
Re: How do i put anti team kill in my GANGWAR SERVER? - by lameguy - 12.03.2010, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)