SA-MP Forums Archive
SetSpawnInfo - 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)
+--- Thread: SetSpawnInfo (/showthread.php?tid=488616)



SetSpawnInfo - Riddick94 - 18.01.2014

Well, since in 0.3x version we've received some new features to the teams, something should be changed in SetSpawnInfo.

SetSpawnInfo function has teamid parameter:


and I am using that function in my gamemode, and teamid for players is '0'. Which means that they shouldn't be able to kill each other, because if we are in the same team with other players, they're not allowed to kill their team members. Seems like SetSpawnInfo doesn't support it, and it would be nice to see it fixed.

I know, I can still call SetPlayerTeam after that function, but SetSpawnInfo has this parameter for some reason, right?


Re: SetSpawnInfo - Trol_Patrol - 19.01.2014

https://sampwiki.blast.hk/wiki/SetPlayerTeam
Note: 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0


Re: SetSpawnInfo - Riddick94 - 19.01.2014

Quote:
Originally Posted by Trol_Patrol
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/SetPlayerTeam
Note: 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0
And I AM setting player's to teamid '0'. What you didn't get?


Re: SetSpawnInfo - Trol_Patrol - 21.01.2014

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
And I AM setting player's to teamid '0'. What you didn't get?
255 (or NO_TEAM) is the default team to be able to shoot other players, not 0

cannot read ? you should set their team to 255 or NO_TEAM not 0.


AW: Re: SetSpawnInfo - Littl3j0hNy - 21.01.2014

Quote:
Originally Posted by Trol_Patrol
Посмотреть сообщение
255 (or NO_TEAM) is the default team to be able to shoot other players, not 0

cannot read ? you should set their team to 255 or NO_TEAM not 0.
thats not what he wants.


Re: SetSpawnInfo - Riddick94 - 21.01.2014

Quote:
Originally Posted by Trol_Patrol
Посмотреть сообщение
255 (or NO_TEAM) is the default team to be able to shoot other players, not 0

cannot read ? you should set their team to 255 or NO_TEAM not 0.
You can't read.


Re: SetSpawnInfo - Smally - 21.01.2014

Show us your current SetSpawnInfo


Re: SetSpawnInfo - Riddick94 - 21.01.2014

Quote:
Originally Posted by Smally
Посмотреть сообщение
Show us your current SetSpawnInfo
What is wrong with people on this topic? Read my post carefully, please.


Re: SetSpawnInfo - PT - 21.01.2014

Do on playertakedamage see if they are same team


Re: SetSpawnInfo - Riddick94 - 21.01.2014

Quote:
Originally Posted by PT
Посмотреть сообщение
Do on playertakedamage see if they are same team
Well, it does a damage to the other players when I set their team to "0" in SetSpawnInfo function. Which is obvious, that they shouldn't be able to receive any damages. I've made my SetSpawnInfoEx, where I am calling SetSpawnInfo with NO_TEAM (255) and setting player team with SetPlayerTeam to "0". After that, works perfectly.

OnPlayerTakeDamage is being called, even when player is in the same team. So, for example if all the players are in team id "0", they don't do damage to each other, but OnPlayerTakeDamage is being called.