Jump to content

About this function.


Recommended Posts

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

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

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...