ZSMVS - Simple Votemap System


For owners who host the ZS gamemode
v1.5.0 (Stable -Released- Beta)


This addon is not entirely official -per se- to the Zombie Survival server, don’t take it otherwise. Also, this thread had to be restarted back to start, using the image in its raw format (not t tags) made my post break constantly.

https://dl.dropbox.com/u/6917336/garrysmod/banner_browse_workshop.png or https://dl.dropbox.com/u/6917336/garrysmod/gitHub-download-button.png

Q & A:

Q: What is this addon?
A: ZSMVS is simply a votemap system made specifically for the servers who host the ZS gamemode. It gets the map automatically from the maplist_zombiesurvival or maplist.txt. If neither works then it stops working without making the server entirely useless. It is the first votemap system ever to be made under that category.

Q: Will it work on other gamemodes?
A: No it won’t work on your gamemodes or other people’s gamemodes, however I will take special request in a regularly -fashioned- timing. However, it requires certain hooks and variables which I will explain on your request. A TTT version will come out very soon.

Q: How do I install?
A: If you are hosting from a listen server, just subscribe to the addon. If it’s dedicated, then refer here for more info.

Will update more when it’s needed.

Looking forward to the TTT one

I re-considered and implemented the Global Votemap System idea and it actually works. Just need to iron out the map prefixes on load and stuff.

Here’s the layout if anyone’s curious:

GAME.Name = “” – Gamemode’s Name (You can get it from GM.Name or GAMEMODE.Name)
GAME.MapPrefix = {""} – Map prefixes
GAME.MapCycle = “mapcycle_*.txt” – Map cycle (Replace * with the gamemode’s shorter name)

– Hooks
GAME.HookEnd = “” – Round End hook
GAME.HookMap = “” – Round Start or Map Load hook ( not game.LoadNextMap() )

– NOTE: Useful for getting convars
– RETURN: Anything
function GAME:OnInitialize()
– When the votemap initalizes, does nothing when the function is ignored.

– NOTE: Recommended only for TTT or to make the gamemode delay the round end time.
– RETURN: Anything
function GAME:OnStartVote()
– When the votemap opens, does nothing when the function is ignored.

– NOTE: Use this to get the time left for the next round or next map.
– RETURN: Integer
function GAME:GetEndTime()
– How long is the wait? Returns 0 when the function is ignored

– NOTE: Recommended only for TTT or for gamemodes who use game states (ex. wait, preparing, playing, end, etc.)
– RETURN: Boolean
function GAME:ShouldChangeMap()
– Should the votemap instantly change map when it begins the next round? Returns true when the function is ignored.

– NOTE: Use this only when the gamemode supports overriding the mapcycle system and does everything above like the three functions.
– RETURN: Boolean or Inversed ShouldChangeMap Boolean
function GAME:ShouldRestartRound()
– Should the votemap not open when the round is resetting? Returns false when the function is ignored.

– NOTE: Use this to count the votepower to the player. Depends on what you calculate.
– RETURN: Integer
function GAME:GetPlayerVote(pl)
– Just make sure it returns the math. Returns 0 when the function is ignored.