Posts: 3
Threads: 1
Joined: Aug 2016
Reputation:
0
Hey guys...
I'm trying to make a server, and I wanna add 4 or 5 teams in this server, but I wanna make only 2 teams chooseable in the OnPlayerRequestClass, and the another 2 or 3 hidden from the selection... and make a /setfaction command for me (the owner) to set a faction of a player in game, to join one of the hidden teams...
Can you help me with that?
Thanks.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Teams, or classes, can be restricted so they can't be picked. You don't need to hide them. You can also set people to them ingame via a command.
You'll want to be reading some of the tutorials on the forums, and looking at some of the gamemodes in the server package.
This section is more for help with broken code, than providing you with code.
If you use SetPlayerTeam as well, it makes friendly fire off, so you may want to pay attention to that when you are making this.
Posts: 6,242
Threads: 8
Joined: Jun 2008
You'll do fine lol. The server package has rivershell, which is an objective based map. Although outdated, if you read the code over a bit you may gain some information from it. GrandLarceny is also another mode, that while it's not for this purpose, will show you some methods and code structure.
https://sampforum.blast.hk/showthread.php?tid=107762 <=== Teams with restricted teams
https://sampforum.blast.hk/showthread.php?tid=160810 <=== Teams and Team Cars
https://sampforum.blast.hk/showthread.php?tid=282178 <=== Teams alone
All of these will give some info towards having teams.
When running pawno.exe, right click it and run it as admin. It'll show more options than if you run it normally. Namely there's a window pane to the right showing all the functions at your disposal.
(I have only searched for random tutorials, and they are out of date, but they will show more to get you started.)
Any queries about them, or anything around this, chuck them up here, I'll help you out.