SA-MP Forums Archive
Making a player invulnerable for some, and not for others. - 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: Making a player invulnerable for some, and not for others. (/showthread.php?tid=152147)



Making a player invulnerable for some, and not for others. - Sir_Brock - 02.06.2010

I want to make team 1 completely invulnerable to any other team and themselves, while making all other teams invulnerable to team 1.

So essentially, team 1 cannot damage any other team (or teammates), and any other team cannot damage team 1.

Is there any way to do this? I know SetPlayerTeam can be used, but in this scenario I'm struggling to think of how to achieve this.


Re: Making a player invulnerable for some, and not for others. - IcyBlight - 02.06.2010

Well I doubt it's possible, unless you think of a way to detect WHO hit you.

I'm unsure if that's possible, and if it is, it's pretty damned complicated.


Re: Making a player invulnerable for some, and not for others. - Naxix - 02.06.2010

This is just an idea, but you cut set they hp like really high?


Re: Making a player invulnerable for some, and not for others. - Sir_Brock - 02.06.2010

That could work to an extent, only they'd still be able to hurt the other teams.


Re: Making a player invulnerable for some, and not for others. - Naxix - 02.06.2010

Quote:
Originally Posted by [NoV
Austin ]
That could work to an extent, only they'd still be able to hurt the other teams.
Why not just put em into another world? :b But now i don't know waht you gonna use it for tho.


Re: Making a player invulnerable for some, and not for others. - Sir_Brock - 02.06.2010

I could use virtual worlds I guess... was just hoping for a solution that wouldn't require something that seperated the players.


Re: Making a player invulnerable for some, and not for others. - DJDhan - 02.06.2010

You can set them into separate teams and then use
Код:
SetPlayerTeam(playerid,teamid);
That will disable team kill.
So, you can put the players you don't want to fight with each other in one team and rest in the other. But just don't show they are in two different teams. But by the looks of your signature, you are making a TDM server and so you can use this function easily.


Re: Making a player invulnerable for some, and not for others. - Sir_Brock - 02.06.2010

So what happens when they figure it out?


Re: Making a player invulnerable for some, and not for others. - Blacklite - 03.06.2010

Can not be done accurately in the current SA:MP version.


Re: Making a player invulnerable for some, and not for others. - DJDhan - 03.06.2010

Quote:
Originally Posted by Blacklite
Can not be done accurately in the current SA:MP version.
Why not? All he needs is Anti Team Kill and that is very much possible in SA-MP. The only setback is that a team-mate showered with Hydra rockets will definately die.


Re: Making a player invulnerable for some, and not for others. - Sir_Brock - 03.06.2010

I think you're misinterpreting it. It's a pity that you couldn't have a command similar to...

SetPlayerInvulnerable(playerid);
SetPlayerInvulnerableToPlayer(playerid, invulnerabletoplayerid);