[EssentialMode] es_stockmarket | Stock trading for EssentialMode!

@Bush Thanks for the suggestion and critisicm! Limiting the amount was actually on a to do list, if you have the knowledge I’d like if you could make a PR for it :slight_smile:

About the sell button, I’m not entirely sure why that happens. I haven’t noticed that issue myself, once I have a version for es_discord(a new resource coming soon :tm:) I’ll take a look at it to see if I can figure it out myself.

@WhiteTiger First of all, thank you for posting about this before trying to go modify the source :wink: . I can see from your post you have a bit of knowledge as well, would it be possible for you to make a PR for this on the repo so that it can be implemented?

If you’re unable to then I eventually will do so after I have an initial version for es_discord, read the reply for Bush about what that entails :smile:

And last but not least, @Capitan_KaraTV. Could you please post a screenshot about your database so that I can take a look if everything is alright in there? Also your server configuration file could help with finding out the issue.

Hi, i’ve got a Problem :confused:
I “installed” your script on my Server, imported the SQL File, then i opened the menu with /openstocks ingame, after that i tried to buy something but it didnt worked, like nothing happened :confused:

Any errors?

And how does your server configuration look like

No Errors, not in F8 Console and not in the Server Console, i just started it in the bottom of my “script start list” would be a lil bit too much to paste the complete list in here do i need to take have a special order on the list for your script?

Nvm, im just a Idiot :smiley:

Edit: Its working now btw ^^ I just wrote start es_stockmarket and not ensure es_stockmarket :man_facepalming:

1 Like

Thanks for the info :slight_smile:

The Picture:

Database :


Could you rename es_stockmarket-1.0.0 to es_stockmarket? Also could you update to the latest version please

Can someone put check for dead? It is not cool until you waiting for respawn to trade stocks :slight_smile:

What do you recommend for convar settings if I want to tighten the spread between price fluctuation? Example,I would prefer not to see big swings from say 70 to 100 but rather 70 to 73 or 70 to 68 etc. I’d like to prevent massive amounts of money being earned by negating it with smaller market price moves. I’ve confused myself while attempting to do so and figured I’d ask for some advice and recommended settings :slight_smile:

What should net you the lowest (easiest way of) is setting:
es_stockmarket_minRandom to 9
es_stockmarket_maxRandom to 11

However you need to fiddle with es_stockmarket_divider to get an even tinier amount of change(setting it to 100 for example and then min to 99 and max to 101)

1 Like

Thanks! This really helped!

I use the last version stable (2367) and is crashing but no have error in console!!

2020-04-18_19h25_18|459x347

Huh? I don’t think this is related to my resource.

when I remove your resources from the cfg it works!
What artifacts you try ?

I am myself on the latest, if you could add me on Discord maybe we can figure it out together.

thank for awesome stock script

for some reason everything is working good but I have same error the guys got it before for this line

shallowCopy(userStockCache[user.getIdentifier()], stocks)

and this error :

anyone have a fix for it ?

That’s odd though as that just gets the identifier of a user, does everything work properly? Because it shouldn’t work at all if you get an error like that

seems all good to me I can buy and sell and update fine every 30s also register the player stocks on DB

but this error comes once when a player join server just that player then not showing up again until some one else join it comes again …

Very good, but I want to ask you, how to set a limit for players to buy stocks ??? I hope you will answer me, because this is more important!! :wink: