Jump to content

DD or DM in MapInfo


xF_Micka

Recommended Posts

Hello.

I need help about the MapInfo function of my race gamemode (adapted for DD/DM).

Here are the part of script :

function handleMapInfo(mapInfo) 
    name            = mapInfo.name or "Unknown" 
    author          = mapInfo.author or "Unknown" 
    playedCount     = tostring(mapInfo.playedCount or "N/A") 
    lastTimePlayed  = timestampToDate(mapInfo.lastTimePlayed) or "Unknown" 
    modename        = mapInfo.modename ~= "Destruction derby" and mapInfo.modename or "DD / DM" 
  
outputChatBox("#FFFFFF* #E1AA5AMap created by: #FFFFFF"..author.."",255,255,255,true) 
outputChatBox("#FFFFFF* #E1AA5APlayed: #FFFFFF"..playedCount.." #E1AA5Atimes",255,255,255,true)  
outputChatBox("#FFFFFF* #E1AA5ALast time: #ffffff"..lastTimePlayed.."",255,255,255,true) 
  
    startTick = getTickCount() 
     
    if not enabled then 
        addEventHandler("onClientRender",getRootElement(),handleOnRender) 
        enabled = true 
    end 
end 
addEvent("onClientMapStarting",true) 
addEventHandler("onClientMapStarting",getRootElement(),handleMapInfo) 

I would like to use "modename" for example to display if it's a DM or DD map (we check if ghostmode is enabled or not, on DD : GM disabled, on DM : ghost enabled).

For outputChatBox I have already the line :

outputChatBox("#FFFFFF* #E1AA5AMode: #ffffff"..modename.."",255,255,255,true) 

Can help me please ?

Thanks.

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