Raised This Month: $4 Target: $400
 1% 

[ANY] tLevelMod v0.1.3 (2010-04-05)


Post New Thread Reply   
 
Thread Tools Display Modes
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 06-01-2011 , 17:51   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #91

Quote:
Originally Posted by Thrawn2 View Post
race condition brainfuck.
if you want to know more, read all 3 pages...
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 06-01-2011 , 18:38   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #92

Which 3 pages? There's 10 pages to this thread.

Also, what does "race condition brainfuck" even mean? I don't understand.

If anyone could get permanent levels working, even in a flatfile or SQLite, would be great.
__________________

Last edited by StrikerMan780; 06-01-2011 at 18:45.
StrikerMan780 is offline
Send a message via Skype™ to StrikerMan780
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 06-01-2011 , 18:54   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #93

only three for me.
92 posts.

http://en.wikipedia.org/wiki/Race_condition
and brainfuck because i couldnt get my head around it then.
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
KarnageInk
Member
Join Date: Oct 2010
Old 01-31-2012 , 14:45   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #94

Hi

im also having the same problems that the levels gets reset to 0 everytime. my friends love to lvl up and show off that they are veterans. im using this for l4d2. any1 found a fix for this? bot lvls are saved but nt human players
KarnageInk is offline
NiagaraDryGuy
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 02-02-2012 , 01:45   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #95

Quote:
Originally Posted by StrikerMan780 View Post
If anyone could get permanent levels working, even in a flatfile or SQLite, would be great.
MySQL would be preferred for this.

Hell, if I knew anything at all about the SQL side of SourcePawn coding, I'd do it myself.

However, I knoweth not a damneth thingeth about MySQL database coding for SM plugins.

So yeah, hopefully someone here can get this up and running, because I'd love to set this up on my server, and have 80 levels for players to get, then give them the option to "Prestige" or something similar, which would unlock some various non-gameplay-breaking, purely cosmetic benefits.
__________________
Creator of the AlliedModders Discord
NiagaraDryGuy is offline
necavi
Veteran Member
Join Date: Sep 2010
Old 02-02-2012 , 01:50   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #96

I'd be happy to the SQL side of that kind of thing for someone.
necavi is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 02-10-2012 , 01:43   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #97

Hiya Thrawn; I came across this snippet today thanks to the most recent post and decided to use it as the basis of a Dodgeball RPG plugin I've been working on for a little while. I've modified the script a bit, but I've fixed the clientpref issue and added MySQL support. You're free to copy/paste what you want into your actual plugin, but just note that I changed a lot of variable names to suit my coding style (less it sneer me everytime I work with it). There were some other updates as well, so I'll just post the revision log for the attached files:
Quote:
Added internal support for ClientPrefs into levelmod, removing the need for levelmod.permanent.clientprefs.sp. This was more so required to make it function properly.
Added support saving/loading information to a SQL database, table/database.cfg entry "levelmod" by default.
--- Note; You could export your clientpref data to another sqlite database and use it with the sql support feature.
Added proper support for loading levelmod.core late, so that data is loaded without requiring a map change.
Modified various segments of code for personal reasons and for minor adjustments/improvements.
Modified client loading process for ClientPrefs to a method that I know functions properly (shouldn't be a race condition issue anymore).
Fixed a few timer issues, while not necessarily harmful, could have caused issues later down the road in future development.
Raised the hardcoded level support of levelmod.core to 1000, as opposed to 101, as well as the cvar cap.
Modified several natives to return values based on whether or not a client had properly loaded.
--- lm_SetClientLevel, lm_SetClientXP, lm_GiveXP, lm_GiveLevel return true is successful, false if not loaded
--- lm_GetClientLevel, lm_GetClientXP, lm_GetClientXPNext return -1 if not loaded, otherwise correct value.
Added forward lm_OnCoreLoad, which fires when levelmod.core is loaded for the first time.
Added forward lm_OnClientLoad, which fires when a client is successfully loaded by levelmod.core
Added cvar sm_lm_exp_savemethod, which determines the save method for levelmod.core: (0 = Disabled, 1 = ClientPrefs, 2 = Database)
Added cvar sm_lm_exp_savefrequency, which saves clients lvl/exp every x seconds (0 = Disabled, Default: 15 minutes)
--- Note: The original clientprefs save plugin would only save on levelup/disconnect; both are true for the internal version, but this is extra incase of crash / long maps.
Added extra checks to ensure a client's Next Level EXP is always -1 if at max level.
Added native lm_IsClientLoaded, which checks if a client has been fully loaded by levelmod.core.
The experience table is now created only at plugin launch (delayed 0.1 seconds after), and upon change of cvar sm_lm_exp_reqmulti.
Levelmod.core now creates a cvar config file, which should be located somewhere along the lines of <game>/<config>/sourcemod/levelmod.core.cfg
Added cvar sm_lm_exp_savebots, which will save bots under their name if sm_lm_exp_savemethod is set to 2.
It should be noted that the attached files didn't get any real form of strenuous testing, but they're methods I use in dozens of other plugins without issue so there shouldn't be any problems.
Attached Files
File Type: inc levelmod.inc (3.6 KB, 164 views)
File Type: sp Get Plugin or Get Source (levelmod.core.sp - 372 views - 24.4 KB)
File Type: smx levelmod.core.smx (12.0 KB, 165 views)
__________________

Last edited by thetwistedpanda; 02-10-2012 at 01:48.
thetwistedpanda is offline
ktm
Member
Join Date: Aug 2012
Old 03-20-2013 , 14:34   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #98

So I have this up and running on my server thanks to thetwistedpanda and your work thrawn. This is truly something awesome.

Now though I want to expand upon it to make it a more functional, user friendly plugin. Basically I was wondering, would there be a way to introduce a top 10 player list that is viewable by editing the ranking.sp file? Or would another module be needed?
__________________
My Plugins:
Zombie Fortress Redux
ktm is offline
Cramik
Senior Member
Join Date: Jan 2013
Old 03-23-2013 , 15:03   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #99

Do you have to have the description I like to keep mine as Cramik's Mode do to having all the mods i like and being unique
__________________
If you wanna learn anything (Im not exaggerating) tell me I probably have a book,answer,or tut.
Cramik is offline
Send a message via Skype™ to Cramik
ktm
Member
Join Date: Aug 2012
Old 03-29-2013 , 03:15   Re: [ANY] tLevelMod v0.1.3 (2010-04-05)
Reply With Quote #100

Hey there, so I've been working on the hud part of this modular plugin. Sadly, whenever I try to compile my changes I get this error:
  • fatal error 120: cannot read from file "levelmod"

I've attempted to compile with the include levelmod, but so far I've had not luck. I can't seem to figure out how to compile with levelmod.

The code in question with the includes:

Quote:
#include <sourcemod>
#include <sdktools>
#include <levelmod>
#include <tf2_advanced>

#pragma semicolon 1

#define NO_ATTACH 0
#define ATTACH_NORMAL 1
#define ATTACH_HEAD 2

#define PLUGIN_VERSION "0.1.1"
#define SOUND_LEVELUP "misc/achievement_earned.wav"
So how can I compile with levelmod and TF2_advanced?

I've also attached the raw .sp file at the bottom if anyone wants to attempt to compile it on their side.
Attached Files
File Type: sp Get Plugin or Get Source (levelmod.hud.tf2.sp - 76 views - 7.4 KB)
__________________
My Plugins:
Zombie Fortress Redux
ktm is offline
Reply


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 21:47.


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