refs and passing/canceling votes

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
User avatar
th
Posts: 3
Joined: Thu Feb 09, 2006 5:51 am
Contact:

refs and passing/canceling votes

Post by th »

Hallo,

on my server there is a lua script which allows some users (specified by punkbuster guid) to referee themselves by using the command /refereeme. The script gives them the ref rights with the following command.

Code: Select all

et.trap_SendConsoleCommand(et.EXEC_APPEND, "ref referee " .. cno .. "\n")
The problem: referees who got ref'd with this command aren't able to pass or cancel votes (but /ref-referees are). So my question is: is there a way to allow them to pass and cancel votes by pressing F1 or F2 twice? Temporary, I added two new commands (/passv and /cancelv) but I don't like this way. ;)

I hope someone can help me. :)
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

i believe semiadmins can... and you can give them semiadmin access
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

This is a difference between logged in refs and voted or ref referee'd refs. You will have to poke some additional bits to make them equivalent to logged in refs. Check sess.flags
send lawyers, guns and money
User avatar
th
Posts: 3
Joined: Thu Feb 09, 2006 5:51 am
Contact:

Post by th »

Thanks for your answers.

I checked out the source code and figured out, that voted or ref referee'd refs have sess.referee = RL_REFEREE.

Code: Select all

// from g_vote.c
cl->sess.referee = RL_REFEREE;	// FIXME: Differentiate voted refs from passworded refs
logged in refs have sess.referee = 1

Code: Select all

// from g_referee.c
ent->client->sess.referee = 1;
would it be done if I just change sess.referee to 1?

Code: Select all

et.gentity_set(cno, "sess.referee", 1)
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

RL_REFEREE is 1 (defined in etmain/ui/menudef.h :?)

The FIXME means that it was something the developers thought needed to be done, but hadn't done yet, so this is etpro specific. It looks like the field you need isn't actually exposed in lua.
send lawyers, guns and money
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

voted or non voted can be found in the etoro P var if remmber correct
Post Reply