Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[RELEASE] Voting system v1.0

Опубликовано:

This voting system includes map and gametype voting (works on dedicated servers and in private match).

 

You can even decide if you want both or just one of them (map/gametype) to be voted.

It's adjustable by dvar.

The voting system pops-up on map-end with some kind of timer (33 seconds stock...)

 

Beta1 video (recorded on MAGIC's dedi):

//sorry for that 4:3 ratio, recorded on crt

 

Dvars (adjustable in server.cfg):

 

set sv_votemaps "Favela,Afghan,Crash,Skidrow,Estate,Trailerpark,Strike,Vacant,Highrise,Storm,Invasion,Karachi,Bailout,Subbase,Rundown,Quarry"  //map pool from which maps to be voted will be chosen randomly

set sv_votemodes "sd,war,dom,ctf,dm" //gametypes to be voted, use the name which you'd use in server.cfg

set sv_mapcount "8" //Number of maps to be displayed in menu, they will be chosen randomly from sv_votemaps pool.

set sv_voteAll "0" //1 = map and gametype voting, 0 = only one of them

set sv_voteOnly "map" //"gametype" only map/gametype voting (will work if sv_voteAll is set to 0 only)

set sv_menusound "1" //lel

 

If there are any typing errors in sv_votemaps or sv_votemodes dvar, the server will display an error message when you're connected to it

Mapnames to choose from:

Favela
Crash
Skidrow
Estate
Wasteland
Strike
Vacant
Highrise
Invasion
Karachi
Bailout
Subbase
Afghan
Carnival
Fuel
Salvage
Scrapyard
Derail
Quarry
Rundown
Rust
Underpass
Overgrown
Storm
Trailerpark

 

Modes to choose from:

war
dm
dom
koth
sab
sd
arena
dd
ctf
oneflag
gtnw
oitc
gg
ss
m40a3 //Note: only works on oilrig AFAIK

Some config examples:

 

You want both, map and gametype to be voted:

//Make sure sv_voteAll is set to 1, sv_voteOnly doesn't matter then :

set sv_voteAll "1"

 

You want map voting only:

set sv_voteAll "0"

set sv_voteOnly "map"

 

You want gametype voting only

//NOTE: make sure you haven't set gametypes in your maprotation, check sv_maprotation dvar in your server.cfg

and delete the gametypes in front of maps, if needed.

set sv_voteAll "0"

set sv_voteOnly "gametype"

 

The other dvars should be kinda self-explanatory.

 

If the server is empty or no one votes for map, a map from sv_votemaps will be chosen randomly.

If gametype and map voting is on, but nobody votes for a gametype, the gametype will stay.

If only gametype voting is on, but no one votes, a gametype will be chosen randomly from sv_votemodes.

Players have 33 seconds to vote by default.

 

MAGIC's mapvote server: (running beta1)

connect 176.28.52.170:28972

 

About merging with other mods:

If the mod you want to merge this with isn't modifiying _gamelogic.gsc, you'll just have to copy-paste the folders of this mod to the mod you want to add voting to. (extract the .iwd before of course)

In case your mod does modify _gamelogic.gsc, compare both _gamelogic.gsc's with notepad++ and copy-paste the appropriate lines.

If you need any help, feel free to contact me.

 

Note:If you want to use this in private match make sure to change setDvar( "sv_changemethod", 1 ); to 0 in _vote_menu.gsc

 

Credits: iAegle for some of the menu parts, rest to me

 

Virustotal: https://www.virustotal.com/file/cf4de6d ... 357685804/

Featured Replies

Опубликовано:
  • Автор

I created a server:

connect 176.28.52.170:28972

 

SERVER ONLINE

 

Nice. It seems to be stable now, huh?

 

 

Soon to be added (It works flawlessly, but i don't wont to upload a new revision every few hours. Feel free to pm me though..) :

 

I've implemented a new dvar: "sv_mapcount" which defines the number of maps to be voted from.

The number of maps defined by "sv_mapcount" will be chosen randomly from the map pool defined by "sv_votemaps". Those will be displayed in the menu in a random order.

 

So feel free to define more than 15 maps in "sv_votemaps" now. But keep in mind: there will be 15 maps max. to show up in the menu.

By default 8 maps will show up in the vote menu.

Опубликовано:
  • Автор

Released a beta1 with map or/and gametype voting.

Should be very stable from what i've seen on MAGIC's server...

 

I've updated the first post with dvars and attached the new revison.

Please give some feedback.

Опубликовано:
Released a beta1 with map or/and gametype voting.

Should be very stable from what i've seen on MAGIC's server...

 

I've updated the first post with dvars and attached the new revison.

Please give some feedback.

me gusta ._. I'll test when I get home

Опубликовано:
  • Автор

Hmm, smoothed up the 'animation' (if you want to call that thingy one, but you'll see when the vote menu is open).

 

Attachment updated, had only one download anyway. :>

 

EDIT: added a video to the first post.

Опубликовано:
  • Автор
well to add the clan tag or to add dunno the credits or the welcome message......dunno....is possible to change or modify that write?

 

Why wouldn't it be? Just find the appropriate lines in the code...

 

Anyway, has anyone noticed any bugs etc.?

 

Well, i've tweaked some things and removed some debug messages and it's pretty much ready for 'final release'.

  • 3 weeks later...
Опубликовано:
  • Автор

I've added v1.0 to the first post.

 

changelog:

- check added, if there're errors in sv_votemaps or sv_votemodes dvars, a warning message will be shown
- 'animation' should be smooth now

Опубликовано:
  • Автор
SEVENNN":34q5hmt8]i dont get it how to install ??.... i want this in private match ..

thanks..

 

Note:If you want to use this in private match make sure to change setDvar( "sv_changemethod", 1 ); to setDvar( "sv_changemethod", 0 ); in _menu.gsc

 

Опубликовано:
  • Автор
SEVENNN":3tmwwjg0]there's nothing .... i haven't this files.....

 

Extract the z_svr_vote.iwd...

 

You'll find this line in _vote_menu.gsc:

setDvar( "sv_changemethod", 1 );

 

change it to:

 

setDvar( "sv_changemethod", 0 );

 

and repack the files to .iwd with 7zip, winar or similar or just put the entire folder in iw4mdirectory/mods.

  • 2 weeks later...
Опубликовано:
  • Автор
change it to:

setDvar( "sv_changemethod", 0 );

you could also force it through:

seta sv_changemethod "0"

in the server config.

 

No, you can't unlike the other dvars since i force that dvar to 1 in the mod code.

 

Using setDvar( "sv_changemethod", 1 ); and not setDvarIfUninitialized( "sv_changemethod", 1 );, which would be changeable through server.cfg.

 

Reasing being: changemethod 0 causes bugs on dedicated server, because it does use map("mapname"); on game end instead of using exitLevel( false );. Usage of map("mapname"); causes 'potential infinite loop' errors pretty often, resulting in the server getting stuck at game end.

 

So changemethod 0 is for private match only, since manipulation sv_maprotation dvar doesn't work there for obvious reasons...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.