Jump to content

[Question]How to start a map for one player


iPrestege

Recommended Posts

Hi all,

Well i'm working in a 'Multi GameMode' But i couldn't find a way to start a map for the player only here's what i'm trying to do

If the player join the server and choose let's say zombie i want to start the zombie map only for the player and the players in the zombie game only

and if someone choose let's say gang wars i want to start map for the player and the players in the gang wars game only

 

So is there a way to do that? Start a map for a player? i know that 'startResource' to start maps resources but it will be started for all players

I'm trying to start it for the players in the specific game he choose.

 

Hope get some useful answers about that.

 

Regards!

Link to comment

I think the way it works is using different dimensions. So the map is started for everyone, no matter where they are, they just can't see it, since it is in a different dimension. So you must set the different types of gamemodes to different dimensions. Whenever a player chooses a gamemode, he is being sent to dimension #24 for example, and the #24 dimension would have the zombie map (you can set objects' to different dimensions as well). I would do that like this, use the setElementDimension function.

Link to comment

You need to map loader, load map file with xml function then get map elements with xml functions and create elements then set them your dimension

 

You should use

-- get maps resources
getResources
getResourceInfo
xmlLoadFile
xmlNodeGetChildren
xmlNodeGetAttribute
table.insert
triggerClientEvent or triggerLatentClientEvent
-- get map elements
xmlLoadFile
xmlNodeGetChildren
xmlNodeGetAttribute
table.insert

In client use loop to create map elements

Edited by </Mr.Tn6eL>
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...