How i can make a command for rename a TopTime?
addCommandHandler( "deletetime",
function( player, cmd, place )
if not _TESTING and not isPlayerInACLGroup(player, g_Settings.admingroup) then
return
end
if g_SToptimesManager and g_SToptimesManager.mapTimes then
local row = g_SToptimesManager.mapTimes:deletetime(place)
if row then
g_SToptimesManager:updateTopText()
local mapName = tostring(g_SToptimesManager.mapTimes.mapName)
local placeText = place and " #" .. tostring(place) or ""
outputChatBox( "#ff0000INFO: #00ff00Top time "..placeText.." from '" .. tostring(row.playerName) .. "' deleted by " .. getPlayerName(player), 255, 55, 00, true)
outputServerLog( "INFO: Top time"..placeText.." from '" ..tostring(row.playerName).. "' (" ..tostring(row.timeText).. " in " ..mapName.. ") deleted by " .. getAdminNameForLog(player) )
end
end
end
)
This is the command for delete.