Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-25 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 10:17:28 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [Request] Private Race's  (Read 476 times)
GodlyGhost
Newbie
*
Posts: 1


View Profile Email
« on: October 03, 2010, 05:40:09 AM »

Hey i was wondering if in your next release could you add so we can put Steamid's in to races to make them private instead of giving players access through "Custom o" in sourcemod as it would help alot

just a little line somthing like SteamID = STEAM_0:0:123456789 and make so it loads if it doesn't have steam id there aswell ?

Please And Thankyous GodlyGhost
Logged
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #1 on: October 03, 2010, 05:59:43 AM »

I agree Tongue I was working a bit on doing that today.
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2046



View Profile WWW Email
« Reply #2 on: October 03, 2010, 11:52:16 AM »

hows it comin?
Logged

DarkEnergy
Invalid
Newbie
*
Posts: 48


View Profile Email
« Reply #3 on: October 03, 2010, 12:16:40 PM »

I made an extension which adds support for this. It modifies War3Source_Engine_MenuChangerace, so it will have to be reimplemented every time there's a new release, but it works well. I admit the method I used is a bit silly, but I was trying to get it done quick without a lot of work. I basically highjacked the part of the code which checks if admin flags are assigned to a race, and added a special case for the flag "p" (private, get it?). If the race has that flag on it, it checks a keyvalue structured file for the user's steamid under that race's shortname. If the user's ID is not found then the player does not have access to the race. This method allows one to make a race private on-the-fly, without having to restart the server or change map, but doesn't guarantee that players who are already playing as the race will be switched to a different race if they are not included in the permissions file.

A better way to do this would be to create a race cvar like <shortname>_isprivate <1/0>, and have the code check the keyvalue file if it is set to 1, but that would take more work for me to re-implement every time there's an update (more code separation). Since this is such an easy thing to add, I don't see why it isn't implemented officially. I also suggest checking for permissions on player spawn to make this work well with on-the-fly changes.

If anybody wants the sp file, I can upload it.
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2046



View Profile WWW Email
« Reply #4 on: October 03, 2010, 12:21:08 PM »

1 u need to think of ways to write addons so it can live through successive updates, not modifying the entire core each time. i can add special events for you to hook and modify

2 i dont see anyone submitting changes to me in the development section
« Last Edit: October 03, 2010, 12:22:43 PM by Ownz » Logged

DarkEnergy
Invalid
Newbie
*
Posts: 48


View Profile Email
« Reply #5 on: October 03, 2010, 12:26:08 PM »

This is true, but I wanted the user to be aware that a race was private when he accesses the changerace menu. This meant I had to modify the changerace menu code itself. I couldn't simply hook into the race selection event, even though this would allow partial implementation of private race support. As in, if a player changes to a race, check if the race is private, switch him to different race if he's not allowed to use it. That, I figured would be annoying because the player is never made aware that the race is private until he tries to select it, then he has to go and open the menu again and find another race.
Logged
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #6 on: October 03, 2010, 03:52:44 PM »

Mine's not going so well, because I wanted to store it in my MySQL database, but my database guy hasn't been online for like...four days Sad
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2046



View Profile WWW Email
« Reply #7 on: October 03, 2010, 03:54:06 PM »

mysql would be even more complicated
Logged

DarkEnergy
Invalid
Newbie
*
Posts: 48


View Profile Email
« Reply #8 on: October 03, 2010, 06:08:09 PM »

I can see the advantages of having MySQL support, but definitely allow for keyvalue or sqlite storage for people who don't have an SQL server.
Logged
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #9 on: October 03, 2010, 06:16:05 PM »

Well, this one would be for private use XD So we don't really bother with supporting anything other than MySQL Tongue
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!