Raised This Month: $68 Target: $400
 17% 

[Fixed] Enable superhero mid-game


  
 
 
Thread Tools Display Modes
Author Message
Soloist
Senior Member
Join Date: Jun 2004
Location: New York
Old 11-28-2005 , 18:35   [Fixed] Enable superhero mid-game
#1

Is it not possible to load superhero about a min into a map, and have the xp load correctly. Because I wrote a plugin for my server that lets you chose what mini-mod you want to play. and then it enables that plugin. If superhero gets chosen. the superhero CVAR is set and the round is restarted. Well on every time XP is loaded it resets it. But if I just run superhero on round start it saves it and loads it correctly.

Quote:
Originally Posted by shconfig.cfg
//********************** GENERAL MOD CVARS **********************

//Enables/disables the mod 0=disable, 1=enable
sv_superheros 0

//Flag to determine who can access the important server commands
sh_adminaccess a

//If optional C/D is on a server - don't let people without C/D have powers
sh_cdrequired 0

//Debug Message Level
//ONLY enable this if you are trying to fix something, it prints A LOT of messages
// 0 = Disabled, 1 = Server Print, 2 = Server Log, 3+ = More Messages, Server Log
sh_debug_messages 0

//Number of heros allowed with bind characters - after that you must pick non-bind heros only
sh_maxbinds 3

//Max number of powers players can pick from, this is also limited by the number of levels you have.
sh_maxpowers 30

//What level to start newcomers at
sh_minlevel 2

//Save XP or restart it from 0 each map: 1 = save, 0 = restart each map
sh_savexp 1

//How many days XP is saved after a users last connection
//Recommended max setting of 30 for VAULT style saving. Max value is 365.
sh_xpsavedays 365

//Enable this to save XP at end of every round
//May cause a very small ammount of lag at round end with MySQL saving
sh_endroundsave 1

//This cvar sets the value of XP given/taken from players for Hostage / Bomb events.
//Hostage rescues only get 1/4th the XP because there is usually 4 of them.
sh_bombhostxp 8

//Give new players an average level of XP based on people already playing - 1=on | 0=off
//DO NOT USE WITH LONG-TERM XP
sh_autobalance 0

//Load XP right when a player joins (may cause lag with large user database)
sh_loadimmediate 0

// MercyXP gives players XP if they did not gain any during a round
// 0 = MercyXP system Disabled
// 1 = Give any player a set amount of XP which is set with sh_mercyxp
// 2 = Give only players up to a certian level MercyXP, max level is set with sh_mercyxp
// XP given will be the inverse of the amount they would get for killing
// someone at thier level, then this is diveded by 2 to keep it low.
// So as a players level increases they will get less MercyXP with mode 2
sh_mercyxpmode 2

//Mode 1: How much Mercy XP to give players
//Mode 2: Max level to give MercyXP to players
sh_mercyxp 10

//Command Projector, displays help info to players in a HUD messages non-stop - 1+ = on | 0=off
// 1 - Only show to DEAD players
// 2 - Show to ALL players
sh_cmdprojector 1

//How many highest level heros can a person pick
//If this is set to 2 and a client is at level 9, they can only pick 2 level 9 heroes.
//There is a bunch of complicated math that goes into this system and it limits more than
//just the highest level avliable to that person, try it and see what I mean.
//Set to 0 to disable this limiting of choices
sh_lvllimit 3

// 1 = New style menu, shows disabled heros grayed out
// 0 = Old style menu, hides disabled heros from showing on the menu
sh_menumode 1

//Headshot Multiplyer - if you kill someone with a headshot the XP given
//will be multiplied by the value. Setting this to "1.0" will effectivly
//disable it because x * 1 = x. Any value less than 1.0 is ignored.
sh_hsmult 1.5

//Can clients drop heroes while alive?
//This is OFF by default because many people expliot the server by picking a hero
//like batman, get the weapons, then drop him. This will prevent that kind of activity.
sh_alivedrop 1

// *** MySQL Settings, Only Needed if using the mysql saving method ***
// Uncomment the cvar lines to enable these settings

sh_mysql_host "127.0.0.1"
sh_mysql_user "root"
sh_mysql_pass "godschoir"
sh_mysql_db "sherodb"
sh_mysql_persistent 0

...Heros CVARS...
Soloist is offline
Send a message via ICQ to Soloist Send a message via AIM to Soloist Send a message via MSN to Soloist Send a message via Yahoo to Soloist
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 11-28-2005 , 21:52  
#2

I think i see the problem. Try the following and let me know

in client_putinserver(id), and readXP(id) remove the checks for !shModActive()

this will allow the XP to load even if its disabled. then when enabled thier XP should be there waiting.

There is prob a similar bug for the saving, if you disable it mid round all that XP would be lost.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Soloist
Senior Member
Join Date: Jun 2004
Location: New York
Old 11-29-2005 , 11:26  
#3

Ok so far so good. Seems to be working now. Thanks. I'll update if I get problems again.
Soloist is offline
Send a message via ICQ to Soloist Send a message via AIM to Soloist Send a message via MSN to Soloist Send a message via Yahoo to Soloist
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:15.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode