ReckLess Posted April 14, 2012 Share Posted April 14, 2012 Hello! I don't know why, but Top Times panel doesn't work on my own server. I finished all Skotinka maps, and other maps, but didn't appear the Top Time, I tried to finish the map in 3 players online because I thought the problem was because I was playing alone but it is not. Can someone help me? Link to comment
Jaysds1 Posted April 15, 2012 Share Posted April 15, 2012 well, you would have to show us your script or if you downloaded it, you would have to tell the uploader/scripter them selves. Link to comment
Deagle Posted April 15, 2012 Share Posted April 15, 2012 I guess you're using the default "race_toptimes", that's the problem. Link to comment
ReckLess Posted April 18, 2012 Author Share Posted April 18, 2012 Yeah, I'm using the default Top Times panel. Nothing changed. Link to comment
Deagle Posted April 20, 2012 Share Posted April 20, 2012 Use this - https://community.multitheftauto.com/index.php?p= ... ls&id=1345 Link to comment
Puma Posted April 21, 2012 Share Posted April 21, 2012 That sucks. DM toptimes are not in the default toptimes, you have to add it yourself. Lazy people come up with the easiest solution and someone I know came up with just a small edit in a script in the race resource, while someone else made a whole resource out of it, lol, like the one Deagle posted. Open the race resource and open 'race_server.lua' using Notepad. Search (Ctrl+F) for this line (should be somewhere around line 670): elseif pickup.type == 'vehiclechange' then Below this line: clientCall(source, 'vehicleChanging', g_MapOptions.classicchangez, tonumber(pickup.vehicle)) Add this: if ( getElementModel(vehicle) == 425 or getElementModel(vehicle) == 464 or getElementModel(vehicle) == 520 or getElementModel(vehicle) == 447 ) and #getElementsByType("checkpoint") == 0 then triggerEvent('onPlayerFinish', source, rank, g_CurrentRaceMode:getTimePassed()) end Save it, restart the race resource and it should record the DM-toptimes. All credits for this wonderful solution go to WannaKnow. Link to comment
ReckLess Posted June 14, 2012 Author Share Posted June 14, 2012 Hey, I'm back I need to fix this part of code: if mapinfo.name and string.findIgnoreCase(mapinfo.name,"[DM]") then I wanna do something like that: if mapinfo.name and (string.findIgnoreCase(mapinfo.name,"[DM]") or string.findIgnoreCase(mapinfo.name,"[OS]") then But it doesn't work, can you help me? Link to comment
GTX Posted June 14, 2012 Share Posted June 14, 2012 Does your [OS] map has hunter? If no, it will not work because of this: for _,e in pairs(getElementsByType("racepickup") or {}) do local t = getElementData(e,"type") if t and t == "vehiclechange" then local v = getElementData(e,"vehicle") if v and tonumber(v) == 425 then self.hasTimes = true break end end end if self.hasTimes then self:doToggleToptimes( true ) end To fix: for _,e in pairs(getElementsByType("racepickup") or {}) do local t = getElementData(e,"type") if t and t == "vehiclechange" then local v = getElementData(e,"vehicle") --if v and tonumber(v) == 425 then self.hasTimes = true break --end end end if self.hasTimes then self:doToggleToptimes( true ) end Link to comment
ReckLess Posted June 14, 2012 Author Share Posted June 14, 2012 Obviously my OS (Old-School maps) have Hunter, I interpret Lua but I don't understand how to show TT's (and make them) with DM and OS. Can you just fix my code? (read my last post) Link to comment
ReckLess Posted June 15, 2012 Author Share Posted June 15, 2012 Okay, I've fixed it by myself: if mapinfo.name and string.findIgnoreCase(mapinfo.name,"[DM]") or string.findIgnoreCase(mapinfo.name,"[OS]") then 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