Jump to content

Hunteriiiics asd lookkk


Recommended Posts

Huntericccccs guarda questo topic dove tu hai partecipato,

viewtopic.php?f=108&t=49040

è quello del pannello per comprare le mappe :3 bello,

nel txt c'è scritto il procedimento, ma nn ci capisco una mazza asd

ecco il procedimento del txt dentro al pacchetto,

1)Add this zip file or folder in /server/mods/deathmatch/resources 
2)Give admin rights to this resource 
3)Find the race foloder in your resources: 
/resources/[gamemodes]/[race]/race 
Find there racevoting_server.lua 
and add there this code: 
  
addCommandHandler('bm', 
    function(player,command,...) 
        local query = #{...} > 0 and table.concat({...},' ') or nil 
        if not query then 
            if g_ForcedNextMap then 
                outputDebugString('Next map is '..getMapName(g_ForcedNextMap )); 
            else 
                outputDebugString('Next map is not set'); 
            end 
            return 
        end 
        local map,errormsg = findMap(query); 
        if not map then 
            outputRace(errormsg,player); 
            return 
        end 
        local account = getPlayerAccount(player); 
        if (isGuestAccount(account) == false) then 
            g_ForcedNextMap = map; 
            outputChatBox('* '..getPlayerName(player)..' #ffffffhas bought as next map - #ABCDEF'..getMapName(g_ForcedNextMap),getRootElement(),0,240,0,true); 
            takePlayerMoney(player,5000); 
            if account then 
                setAccountData(account,"money",tostring(getPlayerMoney(player))); 
            end 
        else 
            outputChatBox("* Please #abcdefLogin #ffffffor #abcdefRegister!",player,255,255,255,true); 
        end 
    end 
) 
  
  
Or same code in tx_inRace.lua 
  
4)FOR TOPTIMES 
Find the race_toptimes foloder in your resources: 
/resources/[gamemodes]/[race]/[addons]/race_toptimes 
There toptimes_server.lua and add this code: 
  
function updateTextForPanel(gMode,mapName) 
    local tName = getModeAndMap( gMode, mapName); 
    local tSql = executeSQLQuery('SELECT playerName AS pName, timeText AS txTTime FROM '..qsafetablename( tName )); 
    if type(tSql) ~= 'table' or #tSql == 0 then return end 
    if #tSql > 0 then 
        if tSql[1] then t1Nick = tSql[1].pName t1Time = tSql[1].txTTime else t1Nick = false t1Time = false end 
        if tSql[2] then t2Nick = tSql[2].pName t2Time = tSql[2].txTTime else t2Nick = false t2Time = false end 
        if tSql[3] then t3Nick = tSql[3].pName t3Time = tSql[3].txTTime else t3Nick = false t3Time = false end 
        return { nick1 = t1Nick, time1 = t1Time, nick2 = t2Nick, time2 = t2Time, nick3 = t3Nick, time3 = t3Time }; 
    end 
end 
  
function getModeAndMap(gMode,mapName) 
    return 'race maptimes ' .. gMode .. ' ' .. mapName 
end 
  
Or same code in tx_inTops.lua 
  
5)Write /start mapratings 

mi dici come metto le varie cose ? io ci ho provato ma poi mi si bugga il race :3

Link to comment

è scritto cosi chiaro :D

1) Metti la risorsa o .zip o la cartella in resources

2) Trova il file racevoting_server.lua nella cartella race, apri il file ed aggiungi sotto la funzione :

  
addCommandHandler('bm', 
    function(player,command,...) 
        local query = #{...} > 0 and table.concat({...},' ') or nil 
        if not query then 
            if g_ForcedNextMap then 
                outputDebugString('Next map is '..getMapName(g_ForcedNextMap )); 
            else 
                outputDebugString('Next map is not set'); 
            end 
            return 
        end 
        local map,errormsg = findMap(query); 
        if not map then 
            outputRace(errormsg,player); 
            return 
        end 
        local account = getPlayerAccount(player); 
        if (isGuestAccount(account) == false) then 
            g_ForcedNextMap = map; 
            outputChatBox('* '..getPlayerName(player)..' #ffffffhas bought as next map - #ABCDEF'..getMapName(g_ForcedNextMap),getRootElement(),0,240,0,true); 
            takePlayerMoney(player,5000); 
            if account then 
                setAccountData(account,"money",tostring(getPlayerMoney(player))); 
            end 
        else 
            outputChatBox("* Please #abcdefLogin #ffffffor #abcdefRegister!",player,255,255,255,true); 
        end 
    end 
) 
  

Salva il file ed è fatta.

Non dimenticare di avere maprating e toptimes attivo.

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