Edit VOTE's


(Kynval) #1

Hi.
I try to change vote options.

I took the ANTI-LAG option and i try change to it.

I want add in VOTE new option: DOUBLE JUMP ON/OFF.

So I made it:

BUTTONEXT( 6+.5*(WINDOW_WIDTH-18)+6, 122, .5*(WINDOW_WIDTH-18), 14, “DOUBLE JUMP ON”, .24, 11, exec “set g_misc 261”, “^2DOUBLE JUMP ^3is ^2ENABLE” )

BUTTONEXT( 6+.5*(WINDOW_WIDTH-18)+6, 122, .5*(WINDOW_WIDTH-18), 14, “DOUBLE JUMP OFF”, .24, 11, exec “set g_misc 260”, “^2DOUBLE JUMP ^3is ^2DISABLE” )

but this is a little wrong ^^

Want i have to do if I want make a double jump option to vote?

MOD - ETPUB


(Cambodunum) #2

… gonna take a look later (if noone does)

greetz Cambo


(Cambodunum) #3

… im busy atm so if i remember correctly, a vote-command has to be hardcoded (too)
… just simply changing the “menu” shouldnt work without the rconpass

… im not 100% sure
… so maybe some dev knows it better

greetz Cambo


(Paul) #4

Well I’m sure it can’t be done with just doing in the menu, because you have to change at least a server setting. Maybe it can be done with referee/rcon but I’m not sure about that.

At least like cambo says it can be hardcoded but it’s not very easy.


(hellreturn) #5

You can use LUA or change ui code in etpub. Why not use custom commands in Etpub?


(Kynval) #6

so… maybe tell me only whats mind this:
what changing this all numbers ->

// “cg_ui_voteFlags”
#define CV_SVF_COMP 1
#define CV_SVF_GAMETYPE 2
#define CV_SVF_KICK 4
#define CV_SVF_MAP 8
#define CV_SVF_MATCHRESET 16
#define CV_SVF_MUTESPECS 32
#define CV_SVF_NEXTMAP 64
#define CV_SVF_PUB 128
#define CV_SVF_REFEREE 256
#define CV_SVF_SHUFFLETEAMS 512
#define CV_SVF_SWAPTEAMS 1024
#define CV_SVF_FRIENDLYFIRE 2048
#define CV_SVF_TIMELIMIT 4096
#define CV_SVF_WARMUPDAMAGE 8192
#define CV_SVF_ANTILAG 16384
#define CV_SVF_BALANCEDTEAMS 32768
#define CV_SVF_MUTING 65536
#define CV_SVF_SURRENDER 131072
#define CV_SVF_RESTARTCAMPAIGN 262144
#define CV_SVF_NEXTCAMPAIGN 524288
#define CV_SVF_POLL 1048576
#define CV_SVF_MAPRESTART 2097152
#define CV_SVF_SHUFFLENORESTART 4194304
#define CV_SVF_PUTSPEC 8388608

and where is variable/command to it…
this mind… what is reading it… i wont to look on it.


(Cambodunum) #7

Most of 'em are hardcoded into your mod,
some are viewable in the moddocs/manual
so you should take a look into the source

… you should get the modsource
… change/add your “commands”
… and finally compile your mod

iirc you dont need to compile your client
… serverbinary should be enough imo

if you dont have any skills in programing i would
say: dont waste ya sparetime for just one vote-command

greetz Cambo :slight_smile:


(hellreturn) #8

Enable question voting. So, lets player ask question Enable DJ? If majority says yes use command !djon.

You can add custom commands in Etpub.


(Kynval) #9

i have command !dj 1, and !dj 0 but I want to make (with your help) vote option for double jump.


(s1a) #10

If you have lua on your server: you use etpro 3.2.6, etpub 0.9.0 nightly or NQ latest you can use what I’ll tell you.
I already added custom votes for doing scrim package for the .55 community.
All the code you need is in this package:
http://www.ballisticpc.com/joadmin/bpc/etpub/scrimconfigs-s1a-mSc-20090420.pk3

Read votemod.lua and look how I used it to load configs or to do a cointoss vote.
Then look at my modifications to ui/ingame_vote.menu and ui/ingame_vote_config.menu to see how I call the vote.
The rest might be useless for your package.

To resume, the buttons do /callvote poll cointoss . My lua mod trap the start vote, wait for the end of the vote, checks the result to see if it passed and if it did, it sends a command to the server: cp Tails or Heads.


(Kynval) #11

thx… i will try


(Kynval) #12

can you fix all what is wrong? please ^^

http://wrzucacz.pl/file/2881262876587


(Kynval) #13

i can’t make it :confused: