Stoney Posted June 23, 2009 Share Posted June 23, 2009 Hey guys. So I have run into a strange issue with my game mode. When I restart the game mode it changes my skin to 0 (CJ) and I am guessing it would change everyone's skin to that if anyone else was connected. It's a map issue because I get it when I restart the map from the admin window or in code using call(getResourceFromName("mapmanager"), "changeGamemodeMap", map). Is there something automatic that happens when a map is loaded that defaults all clients to CJ skin? Is there some way of avoiding/disabling this? Some background on the game mode. It is an embedded game mode (so shoot me) that is written to run at the same time as freeroam. I realize this isn't how game modes are designed to work but lets forget that. It works great, runs in another dimension and I add/remove players from a specific team when they join/leave the mode. Just to clarify, this bug occurs on the players that are not in my game mode. A final question, can I disable the black screen that occurs when a new map is loaded? Right now I have a fadeCamera(getRootElement(), true, 1.0) in my onGamemodeMapStart to get around that but it's far from optimum. Thanks for any help you can give. Stoney Link to comment
Stoney Posted June 24, 2009 Author Share Posted June 24, 2009 It also sets players money to 0 and sets the time to 12:00 despite not having any time set in the map. It's starting to look like my only way around this would be to make a custom map loader. Any ideas? Link to comment
darkdreamingdan Posted June 26, 2009 Share Posted June 26, 2009 All the symptoms you described are as a result of mapmanager's call of resetMapInfo. This basically means everything is "cleaned" so that its ready for the next mode. Such functions are required, so that when you switch from ctf to tdm you dont get strange effects carrying over such as money,armour skin that may have adverse affects. The idea of an "embedded" gamemode isnt something that i would scrutinize, but you may need a modified mapmanager to take it into account. Link to comment
Stoney Posted June 28, 2009 Author Share Posted June 28, 2009 Absolutely right Talidan. Thanks for the clarification. I got around it by changing back to script from gamemode and handling the map loading manually. Works great now. Link to comment
eAi Posted June 28, 2009 Share Posted June 28, 2009 The mapmanager is designed to handle loading a gamemode and a map together. MTA clearly supports all sorts of other things - multiple maps, multiple gamemodes, whatever, but mapmanager was made to make the common use simple. If you want to do something more exotic, I'd avoid using mapmanager, or make a single gamemode/map that wraps up other gamemodes/maps into one. Link to comment
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