This commit is contained in:
Lunovox 2024-02-19 11:22:10 -03:00
parent f4e224811e
commit 75f95d2f8a
4 changed files with 9 additions and 8 deletions

View file

@ -23,6 +23,7 @@ Colect opinion of player with electronic urn.
* ````/candidateme [<political campaign>]```` : Register your campaign to run for server president.
* ````/candidates```` : Show the name of all candidates for president.
* ````/campaign [<candidate_name>]```` : Show the Campaign of candidate for president.
* ````/vote [<candidate_name>]```` : Vote for a specific candidate for president.
## **API:**

View file

@ -191,7 +191,7 @@ modEUrn.doCheckPresident = function()
PresMaxVoted = iCandPresName
end
end
if PresMaxVoted~="" then
if maxVotes>=1 and PresMaxVoted~="" then
if modEUrn.handler.elected==nil then
modEUrn.handler.elected = { }
end
@ -200,6 +200,12 @@ modEUrn.doCheckPresident = function()
end
modEUrn.handler.elected.president.name = PresMaxVoted
modEUrn.handler.elected.president.when = os.time() --Agora em milisegundos
--[[
Falta:
* enviar email para todos os jogadores anunciando quem ganhou a eleição do mês.
* Faze o som de vitória
--]]
end
end
end

View file

@ -2,7 +2,7 @@
name = eurn
description = Colect opinion of player with electronic urn.
release = 0.1.0
release = 0.2.0
author = Lunovox Heavenfinder
title = Electronic Urn
depends =

View file

@ -15,10 +15,4 @@ eurn.save_compressed (Database Compressed) bool true
# Default: 90 | Min: 0 | Max: 8760
eurn.voter.min_played_hours (Minimum Game Hours) int 90 0 8760
# E-URN:
# Time interval in seconds to check the presidential candidate with the highest number of votes.
# WARNING: Decreasing this value too much can cause server lag.
# Default: 1800 | Min: 300 | Max: 86400
eurn.president.intervalcheck (Interval Check President) int 1800 300 86400