Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getTopFiveKillers()
- killer1 = nil
- killer2 = nil
- killer3 = nil
- killer4 = nil
- killer5 = nil
- local allplayerlist = getElementsByType ( "player" )
- local killstobeat = -1000
- for theKey,thePlayer in ipairs(allplayerlist) do
- if thePlayer ~= killer1 and thePlayer ~= killer2 and thePlayer ~= killer3 and thePlayer ~= killer4 and thePlayer ~= killer5 then
- local killcount = getElementData(thePlayer, "kills")
- if killcount > killstobeat then
- killer1 = thePlayer
- killstobeat = killcount
- end
- end
- local killstobeat = -1000
- for theKey,thePlayer in ipairs(allplayerlist) do
- if thePlayer ~= killer1 then
- local killcount = getElementData(thePlayer, "kills")
- if killcount > killstobeat then
- killer2 = thePlayer
- killstobeat = killcount
- end
- end
- local killstobeat = -1000
- for theKey,thePlayer in ipairs(allplayerlist) do
- if thePlayer ~= killer1 and thePlayer ~= killer2 then
- local killcount = getElementData(thePlayer, "kills")
- if killcount > killstobeat then
- killer3 = thePlayer
- killstobeat = killcount
- end
- end
- local killstobeat = -1000
- for theKey,thePlayer in ipairs(allplayerlist) do
- if thePlayer ~= killer1 and thePlayer ~= killer2 and thePlayer ~= killer3 then
- local killcount = getElementData(thePlayer, "kills")
- if killcount > killstobeat then
- killer4 = thePlayer
- killstobeat = killcount
- end
- end
- local killstobeat = -1000
- for theKey,thePlayer in ipairs(allplayerlist) do
- if thePlayer ~= killer1 and thePlayer ~= killer2 and thePlayer ~= killer3 and thePlayer ~= killer4 then
- local killcount = getElementData(thePlayer, "kills")
- if killcount > killstobeat then
- killer5 = thePlayer
- killstobeat = killcount
- end
- end
- return killer1, killer2, killer3, killer4, killer5
- end
Add Comment
Please, Sign In to add comment