Natural Selection 2

Natural Selection 2

Shine Administration
CuriLife 14 Aug, 2013 @ 3:34pm
Learning how to extend the shine
I have programmed in a few languages but have never looked at ns2 code or programmed in lua. Your documentation is excelent, however, I cannnot seem to find a place where I can give a player temporary access to vote menu items?
< >
Showing 1-4 of 4 comments
тѕсм.Person8880  [developer] 15 Aug, 2013 @ 4:40pm 
Which item(s) do you want them to be able to access, and what are the conditions that must be met for this button to show up?
CuriLife 15 Aug, 2013 @ 11:07pm 
I am hoping to make a rough gather system. The conditions are: 12 clients, voteratio after 1 minute. The capains can move the first 12 to teams. Then click ok and it starts a normal pregame with the 2 commander criteria.

I mean polish and anti abuse measures could be added from there but having just that would be great. Ill have to write and algorythm


Thanks for the response. I guess you could hotload the permissions file after adding a member but im really not familiar with server code of ns2.
Last edited by CuriLife; 15 Aug, 2013 @ 11:13pm
тѕсм.Person8880  [developer] 16 Aug, 2013 @ 6:33am 
In the gather plugin, just create a command that doesn't check for permissions on the server (set the 4th argument to the bind command function to true) but can only be used when the team choosing is running and only by the plugin's chosen captain. So in the command's function just check the player using it and reject the command if they're not a captain.

Then on the client side, edit the main page of the votemenu to add a button for choosing teams to the menu if they're the captain. When the captains are picked server side, send them a network message that sets a flag to enable this button and go from there.

When choosing's finished, send them another network message that disables the button.

That's how I would probably do it, hope that gives you some ideas.
CuriLife 17 Aug, 2013 @ 4:40pm 
ok thanks that is very helpful! Thanks for making such an extendable system btw.
< >
Showing 1-4 of 4 comments
Per page: 1530 50