Memory Posted April 23, 2013 Posted April 23, 2013 Hello, I very interested in "multiple gamemodes" at server. Please, can you are explain me, how check dimension? For example, player join to server, write command /freeroam and setElementDimension set him to other dimension. But how perform checking in script of gamemode, if dimension == 1 then start map those who have in meta dimension 1, if dimension == 0 then maps with dimension 0. My reasoning are valid? Ingame name: [sV]Kostya Name in scripts: Kostya
PaiN^ Posted April 23, 2013 Posted April 23, 2013 getElementDimension " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Memory Posted April 23, 2013 Author Posted April 23, 2013 No, I know it. I mean checking: if dimension == 1 for all players in dimension 1 start map those who have in meta has dimension 1, if dimension == 0 then for all players in dimension 0 start maps with dimension 0 meta of any map ... "***.map" dimension="0"/> ... Ingame name: [sV]Kostya Name in scripts: Kostya
PaiN^ Posted April 23, 2013 Posted April 23, 2013 Well, Maybe you can get the dimension of a map using getResourceInfo, Then get the dimension of the player, And stop any resource that's have a differant dimension for him .. Not sure though " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Moderators IIYAMA Posted April 24, 2013 Moderators Posted April 24, 2013 maybe: local dimension = getElementDimension(getElementsByType ("object")[1]) -- always objects are needed in the map local objects,dimension = getElementsByType ("object"),0 if objects then dimension = getElementDimension(objects[1]) end But it would be better to make a setting in the edf and gamemode. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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