Jump to content

Map Rating


#Paper

Recommended Posts

getMapRating requires map name passed to it.

local g_Root = getRootElement() 
addEventHandler('onGamemodeMapStart', g_Root, 
  function(startedMap) 
    local mapName = getResourceName(startedMap) 
    local getrate = call(getResourceFromName("mapratings"), "getMapRating", mapName) 
    outputChatBox ("#EE2C2C*This map is rated "..getrate.."!", 255,255,255, true) 
  end 
) 

Link to comment
  • 2 weeks later...
getMapRating requires map name passed to it.
local g_Root = getRootElement() 
addEventHandler('onGamemodeMapStart', g_Root, 
  function(startedMap) 
    local mapName = getResourceName(startedMap) 
    local getrate = call(getResourceFromName("mapratings"), "getMapRating", mapName) 
    outputChatBox ("#EE2C2C*This map is rated "..getrate.."!", 255,255,255, true) 
  end 
) 

ok ty, but return a false or table number (table:297324) value, don't return the rate...

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