whyperioN Posted June 17, 2021 Share Posted June 17, 2021 Hi, im making mod about the bank system or new money system, but i can't create file in game. My code is like this: PluginSdkProject1::PluginSdkProject1() { // Initialize plugin here static int money = 100987; plugin::Events::gameProcessEvent += []() { std::ofstream file2("bank.txt"); file2 << money; file2.close(); }; } how can i do that? NOTE: I tried this code outside of gameProcessEvent and it only created and wrote this file just one time. (the reason is cpp classes constructor you know) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now