I am wondering - Patrick - 28.11.2015
A simple thing left me wondering, I've been in this forum for quiet a while and I am still seeing people creating their own variable to assign player to teams, why doesn't people use
SetPlayerTeam? This left me wondering. A beautiful answer would be appreciated.
Re: I am wondering -
Ada32 - 28.11.2015
they just do. setplayerteam just gives you the option for friendly fire. when in doubt, use the wiki
Re: I am wondering - Patrick - 28.11.2015
Quote:
Originally Posted by Ada32
they just do. setplayerteam just gives you the option for friendly fire. when in doubt, use the wiki
|
I know about that. All I am asking why would people create their own team variable when
SetPlayerTeam is available and does the pretty much everything.
Re: I am wondering -
Ada32 - 28.11.2015
Quote:
Originally Posted by Patrick
I know about that. All I am asking why would people create their own team variable when SetPlayerTeam is available and does the pretty much everything.
|
well you will wonder into the abyss. ask yourself, why do dogs bark?
Re: I am wondering -
Ahmad45123 - 28.11.2015
Probably if they want the players to be able to hit themselves ?
As Ada32 is saying, Its just a matter of people getting used to it... Just like stocks.
Re: I am wondering -
Macluawn - 28.11.2015
They want a different functionality than that which SetPlayerTeam provides.
Re: I am wondering -
Vince - 28.11.2015
I wish there were a native to extend the "no friendly fire" option to other teams. So let's say "team cop" with id 1 could not hit "team military" with id 2 and vice versa.
Re: I am wondering - Patrick - 28.11.2015
Makes more sense now, thanks anyways.
Re: I am wondering -
Jay_ - 28.11.2015
Quote:
Originally Posted by Vince
I wish there were a native to extend the "no friendly fire" option to other teams. So let's say "team cop" with id 1 could not hit "team military" with id 2 and vice versa.
|
Well you'd set them both to the same team ID in this instance using SetPlayerTeam - and use your own system for managing any other internal team related functionality.
Re: I am wondering -
Macluawn - 29.11.2015
Jay.. What about a more complex scenario? Example, team A can`t hit Team B and team B can`t hit team C, but team C
can hit team A.
Re: I am wondering -
Ada32 - 29.11.2015
^onplayertake/givedamage
Re: I am wondering -
Crayder - 30.11.2015
Quote:
Originally Posted by Macluawn
Jay.. What about a more complex scenario? Example, team A can`t hit Team B and team B can`t hit team C, but team C can hit team A.
|
That's very simple doing exactly what Jay said.
Re: I am wondering -
TwinkiDaBoss - 13.12.2015
I know this is 10 days old bump, but personally I dont use it due to simple fact it tends to reset OnPlayerDeath & OnPlayerRequestClass, not sure which one of them, I forgot but yeah it resets.
So basically in case you "disabled" OnPlayerRequestClass it will still reset their team, atleast it was like that before, im not sure if it was changed or anything
Re: I am wondering -
NaS - 21.02.2016
Quote:
Originally Posted by TwinkiDaBoss
I know this is 10 days old bump, but personally I dont use it due to simple fact it tends to reset OnPlayerDeath & OnPlayerRequestClass, not sure which one of them, I forgot but yeah it resets.
So basically in case you "disabled" OnPlayerRequestClass it will still reset their team, atleast it was like that before, im not sure if it was changed or anything
|
Well in theory it would still be easier using the native functions when you just set the team on each spawn, then it doesnt matter if it gets reset in the mean time.
But I get what you want to say.
Re: I am wondering -
rjjj - 19.03.2016
Also, codes based on arrays are generally faster than codes which use native functions to do the same thing

.
I hope that I have helped

.