Add alone team.
#1

Hello,

I've almost finished my gamemode, i just want an independant team.

What i mean by "independant" is:
-A team which can be killed by all other teams
-Players from this "independant" team can kill themselves.
-And only one class (if player choose this team, he gots Deagle, Sawn, Tec9, Sniper Rifle)
-This team got only 1 skin (id 230)
-Player who wants to be in this team needs to have 30000 scores. (if he does not have, return "You need 30000 scores to access this team")


If someone can make it or speak with me directly would be very nice.


Thanks.
Reply
#2

A team that can be killed by any other team is classed as a player having 'No Team', which is defined as NO_TEAM, which actually has a value of 255 and not 0 like everyone believes.
PHP код:
SetPlayerTeam(playeridNO_TEAM); 
https://sampwiki.blast.hk/wiki/SetPlayerTeam

https://sampwiki.blast.hk/wiki/GivePlayerWeapon
https://sampwiki.blast.hk/wiki/SetPlayerSkin
https://sampwiki.blast.hk/wiki/GetPlayerScore
Reply
#3

Hi,

I also want to make it appearing on team selection so i should put it as a new case

Then :
SetPlayerSkin(playerid, 230);
GivePlayerWeapon(playerid, 34, 200);
GivePlayerWeapon(playerid, 26, 200);
GivePlayerWeapon(playerid, 24, 200);

And the "NO_TEAM" automatically allows them to kill themselves?


Thanks.
Reply
#4

I think he knows about NO_TEAM already
In another way... U can use

Код:
SetPlayerTeam(playerid, playerid);
Now the team is different for each one +rep me if u like it

Abd yes in NO_TEAM everyone can kill each other
Reply
#5

Quote:
Originally Posted by GamerZz
Посмотреть сообщение
I also want to make it appearing on team selection so i should put it as a new case
You need to add the skins you want under OnGameModeInit using AddPlayerClass.

Then give the player their weapons once they have spawned. OnPlayerSpawn

Quote:

And the "NO_TEAM" automatically allows them to kill themselves?

Any player can kill themselves unless you've specifically made something to prevent them receiving damage. If you mean can the player be killed by his own team? Yes. If a player has their team set to 'NO_TEAM', they can receive damage from any player regardless of what team the other player is on.

Two players with the same team won't be able to damage each other by default, but if both players have their team set to NO_TEAM, then they will be able to damage each other.[/QUOTE]

--

OT:
Quote:
Originally Posted by GameOvr
Посмотреть сообщение
I think he knows about NO_TEAM already
In another way... U can use

Код:
SetPlayerTeam(playerid, playerid);
Now the team is different for each one +rep me if u like it
That completely ruins the point of using SetPlayerTeam in the first place...
If your only sole purpose is to hunt for reputation, I suggest you look for users with more than 50 posts and some reputation. Or even better, look for another forum. Maybe try your luck with being funny in the 'Everything and Nothing' forum, you'll have a better chance there than attempting to be helpful here with useless knowledge.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)