GamerDeMTA Posted July 31, 2013 Share Posted July 31, 2013 setGameSpeed where do I put for who is the gamespeed? I mean root localplayer source that? in the wiki says this: setGameSpeed( thegamespeed ) Link to comment
Vector Posted July 31, 2013 Share Posted July 31, 2013 setGameSpeed is client-side and server-side function. if you call setGameSpeed in a server-side script, then, the game speed will be changed for all players. otherwise, if you use it in client-side, the game speed will be changed only for the client. Link to comment
GamerDeMTA Posted July 31, 2013 Author Share Posted July 31, 2013 thanks !! could you also say me a function for do something IF the map is a [DM] map only? or no possible? Link to comment
Vector Posted July 31, 2013 Share Posted July 31, 2013 i think the name of the gamemode is tdm not dm, addEventHandler ("onGamemodeMapStart", getRootElement (), function (startedMap) -- check if map is only compatible with tdm gamemode. local mapCompatibleGamemodes = exports.mapmanager:getGamemodesCompatibleWithMap (startedMap); -- mapCompatibleGamemodes is a list of compatible gamemodes for the map. -- you just need to check if only tdm is compatible with it. local tdmGamemode = getResourceFromName ("tdm"); local isTdmOnly = (table.getn (mapCompatibleGamemodes)==1) and (mapCompatibleGamemodes[1] == tdmGamemode); if isTdmOnly then -- tdm only... end; end); 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