mirror of
https://gitlab.com/lunovox/e-urn.git
synced 2025-03-20 17:51:21 +00:00
This commit is contained in:
parent
f4e224811e
commit
75f95d2f8a
4 changed files with 9 additions and 8 deletions
|
@ -23,6 +23,7 @@ Colect opinion of player with electronic urn.
|
||||||
* ````/candidateme [<political campaign>]```` : Register your campaign to run for server president.
|
* ````/candidateme [<political campaign>]```` : Register your campaign to run for server president.
|
||||||
* ````/candidates```` : Show the name of all candidates for president.
|
* ````/candidates```` : Show the name of all candidates for president.
|
||||||
* ````/campaign [<candidate_name>]```` : Show the Campaign of candidate for president.
|
* ````/campaign [<candidate_name>]```` : Show the Campaign of candidate for president.
|
||||||
|
* ````/vote [<candidate_name>]```` : Vote for a specific candidate for president.
|
||||||
|
|
||||||
## **API:**
|
## **API:**
|
||||||
|
|
||||||
|
|
8
api.lua
8
api.lua
|
@ -191,7 +191,7 @@ modEUrn.doCheckPresident = function()
|
||||||
PresMaxVoted = iCandPresName
|
PresMaxVoted = iCandPresName
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if PresMaxVoted~="" then
|
if maxVotes>=1 and PresMaxVoted~="" then
|
||||||
if modEUrn.handler.elected==nil then
|
if modEUrn.handler.elected==nil then
|
||||||
modEUrn.handler.elected = { }
|
modEUrn.handler.elected = { }
|
||||||
end
|
end
|
||||||
|
@ -200,6 +200,12 @@ modEUrn.doCheckPresident = function()
|
||||||
end
|
end
|
||||||
modEUrn.handler.elected.president.name = PresMaxVoted
|
modEUrn.handler.elected.president.name = PresMaxVoted
|
||||||
modEUrn.handler.elected.president.when = os.time() --Agora em milisegundos
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
name = eurn
|
name = eurn
|
||||||
description = Colect opinion of player with electronic urn.
|
description = Colect opinion of player with electronic urn.
|
||||||
release = 0.1.0
|
release = 0.2.0
|
||||||
author = Lunovox Heavenfinder
|
author = Lunovox Heavenfinder
|
||||||
title = Electronic Urn
|
title = Electronic Urn
|
||||||
depends =
|
depends =
|
||||||
|
|
|
@ -15,10 +15,4 @@ eurn.save_compressed (Database Compressed) bool true
|
||||||
# Default: 90 | Min: 0 | Max: 8760
|
# Default: 90 | Min: 0 | Max: 8760
|
||||||
eurn.voter.min_played_hours (Minimum Game Hours) int 90 0 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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue