They can team kill o.o? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: They can team kill o.o? (
/showthread.php?tid=193696)
They can team kill o.o? -
Kitten - 27.11.2010
Solved
Re: They can team kill o.o? -
Kitten - 27.11.2010
Solved
Re: They can team kill o.o? -
XoSarahMoX - 27.11.2010
Maybe prevent the zombie from dieing if the weapon is a chainsaw or knife? Not sure how to script though :/
Re: They can team kill o.o? -
cessil - 27.11.2010
do you mean they can damage eachother? you could use SetPlayerTeam(playerid, ZOMBIE_TEAM); and this will cover all zombie classes and SetPlayerTeam(playerid, NON_ZOMBIE_TEAM); which will cover all non infected.
not sure what you're trying to do with
pawn Код:
InfectedT = SetTimer("TurningInfected",6000,false);
pretty sure you want to add a playerid in that timer using SetTimerEx
Re: They can team kill o.o? -
woot - 27.11.2010
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
// Infecting Part
if(newkeys & KEY_FIRE)
{
if(gTeam[playerid] == TEAM_ZOMBIE || gTeam[playerid] == TEAM_CHARGER || gTeam[playerid] == TEAM_HUNTER)
{
if(GetPlayerWeapon(playerid) == 4 || GetPlayerWeapon(playerid) == 9)
{
foreach(Player, i)
{
if(i != playerid)
{
if(gTeam[i] == TEAM_HUMAN || gTeam[i] == TEAM_MEDIC || gTeam[i] == TEAM_ARMY)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(i, X,Y,Z);
if(IsPlayerAimingAt(playerid, X,Y,Z,1))
{
SetPlayerHealth(i,0);
InfectedT = SetTimer("TurningInfected",6000,false);
printf("Infection working");
}
}
}
}
}
}
}
return 1;
}
Re: They can team kill o.o? -
Jochemd - 27.11.2010
Yup, use SetPlayerTeam, which gives immunity to team-mates.