TeamKill error -
buzifej - 18.12.2010
When a team has a player and I shoot with me not to go to his?
Re: TeamKill error -
WillyP - 18.12.2010
I don't understand. You want a teamkiller to switch to the opposite team?
Re: TeamKill error -
buzifej - 18.12.2010
When I shoot a team mate of his life if he does not go
Re: TeamKill error -
Face9000 - 18.12.2010
You want anti team kill,i got it.
Here is:
Code:
forward SettingPlayerTeam();
OnPlayerConnect
Code:
SetTimerEx("SettingPlayerTeam",10,1,"i",playerid);
Add this where u want. (Just like any public).
Code:
public SettingPlayerTeam()
{
for(new playerid; playerid < 200; playerid++)
SetPlayerTeam(playerid, gTeam[playerid]);
return 1;
}
This works
ONLY with gTeam.
Re: TeamKill error -
buzifej - 18.12.2010
But that it should not go to his team mates
Re: TeamKill error -
Face9000 - 18.12.2010
What?I dont understand what u are saying...
Re: TeamKill error -
blackwave - 18.12.2010
Quote:
Originally Posted by buzifej
But that it should not go to his team mates
|
SetPlayerTeam(playerid, teamID);
Wiki:
https://sampwiki.blast.hk/wiki/SetPlayerTeam
Note: Players on the same team can not kill each other
Quote:
Originally Posted by Logitech90
What?I dont understand what u are saying...
|
He means that it shouldn't go to their team mates
Re: TeamKill error -
buzifej - 18.12.2010
if(gTeam[killerid] == gTeam[playerid])
{
TeamKills[killerid]++;
SendClientMessage(killerid, COLOR_RED, "Next is jail!");
GivePlayerMoney(killerid, -1000);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
SetPlayerHealth(killerid,0.0);
GameTextForPlayer(killerid,"~r~Don't team kill",5000,3);
Re: TeamKill error -
Mean - 18.12.2010
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
if( gTeam[ playerid ] == gTeam[ killerid ] )
{
SetPlayerDrunkLevel(playerid, 0);
GivePlayerMoney(killerid, -1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)-2);
SendClientMessage(killerid, COLOR_BRIGHTRED, "You have teamkilled, you lost $1000 and 2 score");
}
else
{
new string[128];
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"You have killed %s and you gained 1000$ and 1 score",string);
SendClientMessage(killerid, COLOR_GREEN, string);
SetPlayerDrunkLevel(playerid, 0);
GivePlayerMoney(killerid,1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
}
return 1;
}
Your english suxs, (no offense)
Re: TeamKill error -
buzifej - 19.12.2010
What is wrong?
public SettingPlayerTeam(killerid,playerid)
{
if(gTeam[killerid] == gTeam[playerid])
{
for(new playerid; playerid < 200; playerid++)
}
}
}
return 1;
}