Jump to content

Strange map issue


Stoney

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...