Hey Community,
Also wenn man /voteredo macht dann wiederholt sich die map ganze zeit.
Kennt sich jemand da aus ?
Lua: Racevote
function voteRedoManagment(player)
if not(tostring(isEventRunning) == "true")then
if not(checkVotedPlayer(player))then
local currentMap = getMapName(exports.mapmanager:getRunningGamemodeMap())
if not(reqFlag)then
requiredVotes = tonumber(math.ceil((getPlayerCount()/2)))
reqFlag = true
end
if not(currentMap == lastMap)then
votesRedo = votesRedo + 1
addVotedPlayers(player)
local r, g, b = getPlayerNametagColor(player)
local hex = RGBToHex(r, g, b)
outputChatBox("#FF6600* V#ffffffoteredo #ff6600| #FF6600"..votesRedo.."#FFFFFF/#FF6600"..requiredVotes.." #ff6600| V#ffffffoted #ff6600B#ffffffy ".. hex ..''.. _getPlayerName(player)..'#FFFFFF ', root, 255, 100, 0, true)
if(votesRedo >= requiredVotes)then
allowRedo = true
end
else
outputChatBox("#FF6600* Y#ffffffou #ff6600c#ffffffan't #ff6600V#ffffffote #ff6600a s#ffffffecond #ff6600T#fffffime #ff6600o#ffffffn #ff6600t#ffffffhe #ff6600s#ffffffame #ff6600m#ffffffap!", player, 255,255,255,true)
end
else
outputChatBox("#FF6600* Y#FFFFFFou #FF6600h#FFFFFFave #ff6600a#fffffflready #Ff6600v#ffffffoted #ff6600o#ffffffn #ff6600t#ffffffhis #ff6600m#ffffffap", player, 255,255,255,true)
end
else
outputChatBox("#FF6600* #FFFFFFYou can't voteredo maps during the #ff6600DGE#FFFFFF.",player,255,255,255,true)
end
end
addCommandHandler("voteredo", voteRedoManagment)
addCommandHandler("vr", voteRedoManagment)
addEventHandler("onMapStarting", getRootElement(), function()
votesRedo = 0
allowRedo = false
reqFlag = false
Alles anzeigen