Jump to content

Problem in Dashboard mod


ALw7sH

Recommended Posts

Posted

Just dont use stuff you do not know about, you have to combine the functions with the race.

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted
Post the Lines of the script (not the whole script)

I do not know what you mean but see this

-- Buy a next map 
function buyMap(thePlayer,mapName,command) 
    local account = getPlayerAccount(thePlayer) 
    if not (isGuestAccount(account)) then 
    local playerCash = tonumber(getAccountData(account,"cash")) 
        if not (mapName == "") then 
            if playerCash >= mapCost then 
                if command then 
                    mapName = getMapName(mapName) 
                else 
                    mapName = tostring(mapName) 
                end 
                if not mapTimer[mapName] then 
                    if not tableFind(mapQueue,mapName) then 
                        table.insert(mapQueue,mapName) 
                        outputChatBox("#0000FF[NEXT] #ffffff"..getPlayerName(thePlayer).."#FFFFFF has bought #0000FF"..tostring(mapName).."#ffffff!",getRootElement(),255,255,255,true) 
                        outputChatBox("#0000FF[NEXT] #ffffff"..tostring(mapName).."#ffffff successfully added to map queue!",getRootElement(),255,255,255,true) 
                        addStat(account,"buyedMaps",1) 
                        setAccountData(account,"cash",playerCash - mapCost) 
                        scoreboardRefresh(thePlayer) 
                        mapTimer[mapName] = setTimer(resetMapTimer,60000*35,1,mapName) 
                        if #mapQueue <= 1 then 
                            triggerEvent("onBoughtMap",getRootElement(),mapName) 
                        end 
                        callClientFunction(getRootElement(),"setMapQueue",mapQueue) 
                    else 
                        outputChatBox("#0000FF[NEXT] #FFFFFFMap "..mapName.." is already in map queue.",thePlayer,255,255,255,true) 
                    end 
                else 
                    local remaining, executesRemaining, totalExecutes = getTimerDetails(mapTimer[mapName]) 
                    if remaining < 60000 then 
                        remaining = math.floor(remaining/1000).."#ffffff second" 
                    else 
                        minutes = math.floor(remaining/60000) 
                        remaining = string.format('%02d',minutes).."#ffffff minutes" 
                    end 
                    outputChatBox("#0000FF[NEXT] #FFFFFFYou have to wait #0000FF"..remaining.." to set this map!",thePlayer,255,255,255,true) 
                end 
            else 
                outputChatBox("#0000FF[NEXT] #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) 
            end 
        else 
            outputChatBox("#0000FF[NEXT] #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) 
        end 
    else 
        outputChatBox("#0000FF[NEXT] #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) 
    end 
end 

Posted
Line 1275 of the dash_c.lua file and line 2021 of dash.lua are needed.

dash_c.lua

function drawMapInfo() 
    local tick = getTickCount() - mapInfos.tick 
    local progress = tick/700 
    if progress >= 1 then progress = 1 end 
    local alpha = interpolateBetween(0,0,0,255,0,0,progress,"Linear") 
    dxDrawText(mapInfos.titles[mapInfos.count],0,sY-dxGetFontHeight(3*scale,"default-bold")-dxGetFontHeight(5*scale,"default-bold"),sX,sY-dxGetFontHeight(3*scale,"default-bold"),tocolor(141,182,205,alpha),3*scale,"default-bold","center","center",false,false,true) 
    dxDrawText(mapInfos.data[mapInfos.count],0,sY-dxGetFontHeight(5*scale,"default-bold"),sX,sY,tocolor(255,255,255,alpha),5*scale,"default-bold","center","center",false,false,false,true) 
end 

dash.lua

function getMapInfo( map ) 
    if not g_MapInfoList then 
        loadMapInfoAll() 
    end 
    if not g_MapInfoList[map] then 
        g_MapInfoList[map] = {} 
    end 
    local mapInfo = g_MapInfoList[map] 
    if mapInfo then 
        return mapInfo 
    end 
end 

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