XxRomxX Posted July 19, 2013 Share Posted July 19, 2013 Eh Tenido Un Problema Con mi MapShop de Race ya que no me deja Comprar mapas y me salio un error,el error es este "ERROR: call: failed to call 'race_toptimes:updateTextForPanel' [string "?"] Link to comment
Arsilex Posted July 19, 2013 Share Posted July 19, 2013 esa funcion le falta a tu race_toptimes. updateTextForPanel Link to comment
XxRomxX Posted July 19, 2013 Author Share Posted July 19, 2013 function updateTextForPanel ( gMode, mapName ) local tName = getModeAndMap ( gMode, mapName ); local tSql = executeSQLQuery ( 'SELECT playerName AS pName, timeText AS txTTime FROM ' .. qsafetablename ( tName ) ); if not tSql or #tSql == 0 then return false end if type ( tSql ) == 'table' and #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 No si mira asi tengo el race_toptimes Link to comment
Arsilex Posted July 19, 2013 Share Posted July 19, 2013 pusiste la funcion en el meta? si no lo pusiste ponlo eso va en el meta de tu race_toptimes y otra cosa si tu race_toptimes no se llama race_toptimes tampoco funcionara. Link to comment
XxRomxX Posted July 19, 2013 Author Share Posted July 19, 2013 type="script" name="Mini Map Shop Panel" author="TwiX" version="0.7.0" /> esta asi Link to comment
Arsilex Posted July 19, 2013 Share Posted July 19, 2013 eso es el panel yo dije que añadas la linea de export a el meta de tu race_toptimes. Link to comment
XxRomxX Posted July 19, 2013 Author Share Posted July 19, 2013 No Tampoco Me Funciona el race_toptimes lo tengo asi por las dudas function="updateTextForPanel"/> function updateTextForPanel ( gMode, mapName ) local tName = getModeAndMap ( gMode, mapName ); local tSql = executeSQLQuery ( 'SELECT playerName AS pName, timeText AS txTTime FROM ' .. qsafetablename ( tName ) ); if not tSql or #tSql == 0 then return false end if type ( tSql ) == 'table' and #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 Link to comment
Arsilex Posted July 19, 2013 Share Posted July 19, 2013 te dije que el export va en el meta.xml de el race_toptimes pero tu ni caso... Link to comment
XxRomxX Posted July 19, 2013 Author Share Posted July 19, 2013 Te dije que lo coloque en el meta y no funciono Link to comment
XxRomxX Posted July 19, 2013 Author Share Posted July 19, 2013 Ademas,Yo Uso el MapShop de Twix Link to comment
MTA Team 0xCiBeR Posted July 19, 2013 MTA Team Share Posted July 19, 2013 Yo uso el mapshop de twix y nunca tube que modifcar nada en el meta..Fijate que probablemente tu version es antigua..Yo tengo la version actual, si la quieres, manda PM y con gusto te la doy Saludos Link to comment
XxRomxX Posted July 20, 2013 Author Share Posted July 20, 2013 y otra cosa es que no me deja comprar mapas Link to comment
FraN-724 Posted July 20, 2013 Share Posted July 20, 2013 postea el server side de tu buy shop y el racevoting_server Link to comment
XxRomxX Posted July 20, 2013 Author Share Posted July 20, 2013 race_voting.server -- -- racemidvote_server.lua -- -- Mid-race random map vote and -- NextMapVote handled in this file -- local lastVoteStarterName = '' local lastVoteStarterCount = 0 ---------------------------------------------------------------------------- -- displayHilariarseMessage -- -- Comedy gold ---------------------------------------------------------------------------- function displayHilariarseMessage( player ) if not player then lastVoteStarterName = '' else local playerName = getPlayerName(player) local msg = '' if playerName == lastVoteStarterName then lastVoteStarterCount = lastVoteStarterCount + 1 if lastVoteStarterCount == 5 then msg = playerName .. ' started a vote. Hardly a suprise.' elseif lastVoteStarterCount == 10 then msg = 'Guess what! '..playerName .. ' started ANOTHER vote!' elseif lastVoteStarterCount < 5 then msg = playerName .. ' started another vote.' else msg = playerName .. ' continues to abuse the vote system.' end else lastVoteStarterCount = 0 lastVoteStarterName = playerName msg = playerName .. ' started a vote.' end outputRace( msg ) end end ---------------------------------------------------------------------------- -- displayKillerPunchLine -- -- Sewing kits available in the foyer ---------------------------------------------------------------------------- function displayKillerPunchLine( player ) if lastVoteStarterName ~= '' then outputRace( 'Offical news: Everybody hates ' .. lastVoteStarterName ) end end ---------------------------------------------------------------------------- -- startMidMapVoteForRandomMap -- -- Start the vote menu if during a race and more than 30 seconds from the end -- No messages if this was not started by a player ---------------------------------------------------------------------------- function startMidMapVoteForRandomMap(player) -- Check state and race time left if not stateAllowsRandomMapVote() or g_CurrentRaceMode:getTimeRemaining() < 30000 then if player then outputRace( "I'm afraid I can't let you do that, " .. getPlayerName(player) .. ".", player ) end return end displayHilariarseMessage( player ) exports.votemanager:stopPoll() -- Actual vote started here local pollDidStart = exports.votemanager:startPoll { title='Do you want to change to a random map?', percentage=51, timeout=15, allowchange=true, visibleTo=getRootElement(), [1]={'Yes', 'midMapVoteResult', getRootElement(), true}, [2]={'No', 'midMapVoteResult', getRootElement(), false;default=true}, } -- Change state if vote did start if pollDidStart then gotoState('MidMapVote') end end addCommandHandler('new',startMidMapVoteForRandomMap) ---------------------------------------------------------------------------- -- event midMapVoteResult -- -- Called from the votemanager when the poll has completed ---------------------------------------------------------------------------- addEvent('midMapVoteResult') addEventHandler('midMapVoteResult', getRootElement(), function( votedYes ) -- Change state back if stateAllowsRandomMapVoteResult() then gotoState('Running') if votedYes then startRandomMap() else displayKillerPunchLine() end end end ) ---------------------------------------------------------------------------- -- startRandomMap -- -- Changes the current map to a random race map ---------------------------------------------------------------------------- function startRandomMap() -- Handle forced nextmap setting if maybeApplyForcedNextMap() then return end -- Get a random map chosen from the 10% of least recently player maps, with enough spawn points for all the players (if required) local map = getRandomMapCompatibleWithGamemode( getThisResource(), 10, g_GameOptions.ghostmode and 0 or getTotalPlayerCount() ) if map then g_IgnoreSpawnCountProblems = map -- Uber hack 4000 if not exports.mapmanager:changeGamemodeMap ( map, nil, true ) then problemChangingMap() end else outputWarning( 'startRandomMap failed' ) end end ---------------------------------------------------------------------------- -- outputRace -- -- Race color is defined in the settings ---------------------------------------------------------------------------- function outputRace(message, toElement) toElement = toElement or g_Root local r, g, b = getColorFromString(string.upper(get("color"))) if getElementType(toElement) == 'console' then outputServerLog(message) else if toElement == rootElement then outputServerLog(message) end if getElementType(toElement) == 'player' then message = '[PM] ' .. message end outputChatBox(message, toElement, r, g, b) end end ---------------------------------------------------------------------------- -- problemChangingMap -- -- Sort it ---------------------------------------------------------------------------- function problemChangingMap() outputRace( 'Changing to random map in 5 seconds' ) local currentMap = exports.mapmanager:getRunningGamemodeMap() TimerManager.createTimerFor("resource","mapproblem"):setTimer( function() -- Check that something else hasn't already changed the map if currentMap == exports.mapmanager:getRunningGamemodeMap() then startRandomMap() end end, math.random(4500,5500), 1 ) end -- -- -- NextMapVote -- -- -- local g_Poll ---------------------------------------------------------------------------- -- startNextMapVote -- -- Start a votemap for the next map. Should only be called during the -- race state 'NextMapSelect' ---------------------------------------------------------------------------- function startNextMapVote() exports.votemanager:stopPoll() -- Handle forced nextmap setting if maybeApplyForcedNextMap() then return end -- Get all maps local compatibleMaps = exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource()) -- limit it to eight random maps if #compatibleMaps > 8 then math.randomseed(getTickCount()) repeat table.remove(compatibleMaps, math.random(1, #compatibleMaps)) until #compatibleMaps == 8 elseif #compatibleMaps < 2 then return false, errorCode.onlyOneCompatibleMap end -- mix up the list order for i,map in ipairs(compatibleMaps) do local swapWith = math.random(1, #compatibleMaps) local temp = compatibleMaps[i] compatibleMaps[i] = compatibleMaps[swapWith] compatibleMaps[swapWith] = temp end local poll = { title="Choose the next map:", visibleTo=getRootElement(), percentage=51, timeout=15, allowchange=true; } for index, map in ipairs(compatibleMaps) do local mapName = getResourceInfo(map, "name") or getResourceName(map) table.insert(poll, {mapName, 'nextMapVoteResult', getRootElement(), map}) end local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap then table.insert(poll, {"Play again", 'nextMapVoteResult', getRootElement(), currentMap}) end -- Allow addons to modify the poll g_Poll = poll triggerEvent('onPollStarting', g_Root, poll ) poll = g_Poll g_Poll = nil Link to comment
FraN-724 Posted July 20, 2013 Share Posted July 20, 2013 Ok remplaza esto por lo tuyo racevoting_server -- -- racemidvote_server.lua -- -- Mid-race random map vote and -- NextMapVote handled in this file -- local lastVoteStarterName = '' local lastVoteStarterCount = 0 ---------------------------------------------------------------------------- -- displayHilariarseMessage -- -- Comedy gold ---------------------------------------------------------------------------- function displayHilariarseMessage( player ) if not player then lastVoteStarterName = '' else local playerName = getPlayerName(player) local msg = '' if playerName == lastVoteStarterName then lastVoteStarterCount = lastVoteStarterCount + 1 if lastVoteStarterCount == 5 then msg = playerName .. ' started a vote. Hardly a suprise.' elseif lastVoteStarterCount == 10 then msg = 'Guess what! '..playerName .. ' started ANOTHER vote!' elseif lastVoteStarterCount < 5 then msg = playerName .. ' started another vote.' else msg = playerName .. ' continues to abuse the vote system.' end else lastVoteStarterCount = 0 lastVoteStarterName = playerName msg = playerName .. ' started a vote.' end outputRace( msg ) end end ---------------------------------------------------------------------------- -- displayKillerPunchLine -- -- Sewing kits available in the foyer ---------------------------------------------------------------------------- function displayKillerPunchLine( player ) if lastVoteStarterName ~= '' then outputRace( 'Offical news: Everybody hates ' .. lastVoteStarterName ) end end ---------------------------------------------------------------------------- -- startMidMapVoteForRandomMap -- -- Start the vote menu if during a race and more than 30 seconds from the end -- No messages if this was not started by a player ---------------------------------------------------------------------------- function startMidMapVoteForRandomMap(player) -- Check state and race time left if not stateAllowsRandomMapVote() or g_CurrentRaceMode:getTimeRemaining() < 30000 then if player then outputRace( "I'm afraid I can't let you do that, " .. getPlayerName(player) .. ".", player ) end return end displayHilariarseMessage( player ) exports.votemanager:stopPoll() -- Actual vote started here local pollDidStart = exports.votemanager:startPoll { title='Do you want to change to a random map?', percentage=51, timeout=15, allowchange=true, visibleTo=getRootElement(), [1]={'Yes', 'midMapVoteResult', getRootElement(), true}, [2]={'No', 'midMapVoteResult', getRootElement(), false;default=true}, } -- Change state if vote did start if pollDidStart then gotoState('MidMapVote') end end addCommandHandler('new',startMidMapVoteForRandomMap) ---------------------------------------------------------------------------- -- event midMapVoteResult -- -- Called from the votemanager when the poll has completed ---------------------------------------------------------------------------- addEvent('midMapVoteResult') addEventHandler('midMapVoteResult', getRootElement(), function( votedYes ) -- Change state back if stateAllowsRandomMapVoteResult() then gotoState('Running') if votedYes then startRandomMap() else displayKillerPunchLine() end end end ) ---------------------------------------------------------------------------- -- startRandomMap -- -- Changes the current map to a random race map ---------------------------------------------------------------------------- function startRandomMap() -- Handle forced nextmap setting if maybeApplyForcedNextMap() then return end -- Get a random map chosen from the 10% of least recently player maps, with enough spawn points for all the players (if required) local map = getRandomMapCompatibleWithGamemode( getThisResource(), 10, g_GameOptions.ghostmode and 0 or getTotalPlayerCount() ) if map then g_IgnoreSpawnCountProblems = map -- Uber hack 4000 if not exports.mapmanager:changeGamemodeMap ( map, nil, true ) then problemChangingMap() end else outputWarning( 'startRandomMap failed' ) end end ---------------------------------------------------------------------------- -- outputRace -- -- Race color is defined in the settings ---------------------------------------------------------------------------- function outputRace(message, toElement) toElement = toElement or g_Root local r, g, b = getColorFromString(string.upper(get("color"))) if getElementType(toElement) == 'console' then outputServerLog(message) else if toElement == rootElement then outputServerLog(message) end if getElementType(toElement) == 'player' then message = '[PM] ' .. message end outputChatBox(message, toElement, r, g, b) end end ---------------------------------------------------------------------------- -- problemChangingMap -- -- Sort it ---------------------------------------------------------------------------- function problemChangingMap() outputRace( 'Changing to random map in 5 seconds' ) local currentMap = exports.mapmanager:getRunningGamemodeMap() TimerManager.createTimerFor("resource","mapproblem"):setTimer( function() -- Check that something else hasn't already changed the map if currentMap == exports.mapmanager:getRunningGamemodeMap() then startRandomMap() end end, math.random(4500,5500), 1 ) end -- -- -- NextMapVote -- -- -- local g_Poll ---------------------------------------------------------------------------- -- startNextMapVote -- -- Start a votemap for the next map. Should only be called during the -- race state 'NextMapSelect' ---------------------------------------------------------------------------- function startNextMapVote() exports.votemanager:stopPoll() -- Handle forced nextmap setting if maybeApplyForcedNextMap() then return end -- Get all maps local compatibleMaps = exports.mapmanager:getMapsCompatibleWithGamemode(getThisResource()) -- limit it to eight random maps if #compatibleMaps > 8 then math.randomseed(getTickCount()) repeat table.remove(compatibleMaps, math.random(1, #compatibleMaps)) until #compatibleMaps == 8 elseif #compatibleMaps < 2 then return false, errorCode.onlyOneCompatibleMap end -- mix up the list order for i,map in ipairs(compatibleMaps) do local swapWith = math.random(1, #compatibleMaps) local temp = compatibleMaps[i] compatibleMaps[i] = compatibleMaps[swapWith] compatibleMaps[swapWith] = temp end local poll = { title="Choose the next map:", visibleTo=getRootElement(), percentage=51, timeout=15, allowchange=true; } for index, map in ipairs(compatibleMaps) do local mapName = getResourceInfo(map, "name") or getResourceName(map) table.insert(poll, {mapName, 'nextMapVoteResult', getRootElement(), map}) end local currentMap = exports.mapmanager:getRunningGamemodeMap() if currentMap then table.insert(poll, {"Play again", 'nextMapVoteResult', getRootElement(), currentMap}) end -- Allow addons to modify the poll g_Poll = poll triggerEvent('onPollStarting', g_Root, poll ) poll = g_Poll g_Poll = Link to comment
XxRomxX Posted July 20, 2013 Author Share Posted July 20, 2013 No Funciona ademas me dice esto al tratar de comprar el mapa "* A map is already bought at the moment! Please try O later" Link to comment
FraN-724 Posted July 20, 2013 Share Posted July 20, 2013 ¿Añadiste el nombre del resource al grupo admin?, ¿es con todos los maps que te sale eso?. Link to comment
XxRomxX Posted July 20, 2013 Author Share Posted July 20, 2013 Si,Lo Tengo Agregando Y Si Con Todos Los Mapas Link to comment
Arsilex Posted July 20, 2013 Share Posted July 20, 2013 que version de MTA server tienes? Link to comment
Bc# Posted July 21, 2013 Share Posted July 21, 2013 Ese es el minimapshop de twix? Si es ese viene con instrucciones de como instalarlo.. Te dejo el link de el resource original con su ultima actualizacion para que lo revises.. https://community.multitheftauto.com/index.php?p=resources&s=details&id=5801 PD: es tan simple como agregarle un lua a tu race. Link to comment
Recommended Posts