benjamin Posted September 17, 2012 Share Posted September 17, 2012 Hola a Todos. Lo que pasa es que tengo un User Panel Race pero no eh sido capaz de hacer que funcione el buy map Lo que pensaba al comienzo es que podia tener conflictos con el Racevoting_server pero no estoy seguro si sea eso. Bueno les dejo las lineas del Buy map y del Racevoting_server de el nextmap: Primero el Buy map -- Buy a next map function buyMap(thePlayer,mapName) --local playerLevel = tonumber(loadPlayerData(thePlayer,"level")) local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) if mapIsAlreadySet == false then if not (mapName == "") then --if playerLevel >= mapLevel then if playerCash >= mapCost then [color=#FF0000] triggerEvent("onExternalNextmapRequest",thePlayer,thePlayer,mapName)[/color] else outputChatBox("#FF6600* #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) end --else --outputChatBox("#FF6600* #FFFFFFYou need to be level #ABCDEF"..mapLevel.." #FFFFFFor higher to set maps!",thePlayer,255,255,255,true) --end else outputChatBox("#FF6600* #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) end else outputChatBox("#FF6600* #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) end end function resetMapSetStatus() mapIsAlreadySet = false end addEventHandler("onMapStarting",getRootElement(),resetMapSetStatus) addEvent("onScriptSetNextMap",true) addEventHandler("onScriptSetNextMap",getRootElement(), function (mapName) thePlayer = source local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) savePlayerData(thePlayer,"cash",playerCash-mapCost) outputChatBox("#FFFFFFNextmap: "..getPlayerName(thePlayer).."#FFFFFF has bought a next map!",getRootElement(),255,255,255,true) outputChatBox("#FFFFFFNextmap: #FF8800"..mapName,getRootElement(),255,255,255,true) mapIsAlreadySet = true scoreboardRefresh(thePlayer) achievement31(thePlayer) end) addEvent("onRaceSetNextMap",true) addEventHandler("onRaceSetNextMap",getRootElement(), function () mapIsAlreadySet = true end) Ahora el Nextmap (del archivo Racevoting_server) --------------------------------------------------------------------------- -- -- More things that should go in mapmanager -- --------------------------------------------------------------------------- addCommandHandler('checkmap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if query then local map, errormsg = findMap( query ) outputRace( errormsg, player ) end end ) [color=#FF0000]addCommandHandler('nextmap',[/color] function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( '#292929El Siguiente mapa es: ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( '#292929Siguiente mapa:', player ) end return end if not _TESTING and not isPlayerInACLGroup(player, g_GameOptions.admingroup) then return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'El Siguiente mapa Ya Esta Puesto' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox('Siguiente mapa:' .. getMapName( g_ForcedNextMap ) .. ' Lo Puso: ' .. getPlayerName( player ), g_Root, 29, 29, 29) end ) addCommandHandler('buynextmap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( '#292929El Siguiente mapa es: ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( '#292929Siguiente mapa:', player ) end return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'El Siguiente mapa Ya Esta Puesto' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map end ) Por favor quiero saber que cambios tendría que hacerle. Link to comment
robhol Posted September 17, 2012 Share Posted September 17, 2012 Why is everybody incapable of posting in the correct subforum?! Moved.. Link to comment
Arsilex Posted September 17, 2012 Share Posted September 17, 2012 e.e por que no se ve en colores es lua almenos eso ??? y de paso ese buy lo as creado tu o te lo dio el creador si te lo dio el creador pidele a el ayuda si lo has echo tu deverias saber donde crees que fallas Link to comment
benjamin Posted September 17, 2012 Author Share Posted September 17, 2012 Ni Idea por que no se ve de colores xDDD Bueno, el panel me lo paso un amigo y creo que estubo circulando por la web, pero creo aver leido dentro de un lua que el creador es Nextreme. Link to comment
Recommended Posts