Natural Selection 2

Natural Selection 2

Shine Administration
CuriLife 2013 年 8 月 14 日 下午 3:34
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?
< >
目前顯示第 1-4 則留言,共 4
тѕсм.Person8880  [開發人員] 2013 年 8 月 15 日 下午 4:40 
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 2013 年 8 月 15 日 下午 11:07 
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.
最後修改者:CuriLife; 2013 年 8 月 15 日 下午 11:13
тѕсм.Person8880  [開發人員] 2013 年 8 月 16 日 上午 6:33 
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 2013 年 8 月 17 日 下午 4:40 
ok thanks that is very helpful! Thanks for making such an extendable system btw.
< >
目前顯示第 1-4 則留言,共 4
每頁顯示: 1530 50