You can use a table for example:
function Test()
local Table = {{1--[[Hour]], 10--[[Event]]}, {2, 20}, {3, 30}} -- etc ..
for data, value in ipairs(Table) do
if Hour == value[1] and Event == value[2] then
-- code
end
end
Don't know if works just must be like this. If I understood you right .
Ok, so race with that type? DM or with Checkpoints? Cuz if with Checkpoints you should use event: onPlayerFinish.
And if it is with maps such like as DD or DM try using onPlayerWasted.
To get Rank use : exports.race:getPlayerRank()
function is simple, but I didn't tested....
btw if you want to make for DD and DM it will be something different.. Cuz you will need to make exportable 1 function example:
And then you must export this win function in destructionderby.lua : local win = export.YOURFILENAME:win(aliveplayers[1])
DD and DM is a bit harder to make for starters at lua scripting.