^.^ Posted December 10, 2012 Share Posted December 10, 2012 Hey Guys, i have a question. All time when I buy a map via Mapshop I got an error. Mapmanager: Invalid map specified The Code: I put it in race/racevoting_server.lua function buyNextMap(player, buyMap) if not g_ForcedNextMap then if tonumber(getElementData(player,"race.donator")) > 0 then setElementData(player,"race.money",tonumber(getElementData(player,"race.money"))-2500) else setElementData(player,"race.money",tonumber(getElementData(player,"race.money"))-5000) end outputChatBox("#ff6666[sHOP] #ffffffNext map set to "..buyMap.." by "..getPlayerName(player).."", root, 255, 255, 255, true) setElementData(player,"race.mapsbought",tonumber(getElementData(player,"race.mapsbought"))+1) g_ForcedNextMap = buyMap elseif g_ForcedNextMap ~= nil then outputChatBox("#ff6666[sHOP] #ffffffNext map is already set", player, 255, 255, 255, true) end end addEvent("map:buy",true) addEventHandler("map:buy",root,buyNextMap) I hope you can help me. Thank you Link to comment
Castillo Posted December 10, 2012 Share Posted December 10, 2012 What does 'buyMap' return? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now