Server Help

ASSS Custom Projects - Python Scoreboard

Anonymous - Tue Oct 26, 2010 3:07 pm
Post subject: Python Scoreboard
I was wondering if it was possible to make a python module that could keep score, just turning on objects.

Although, my zone is set up for CTF. I noticed in the terminal, things like..

D <fg_ctf> {0} [resol] scores a capture

I <fg_ctf> {0} game over. freq 1 wins (caps=3)

So basically, just not really sure how to start... I know its probably very simple.

Code: Show/Hide

# scoreboard by: resol 10-10

from asss import *

objs = get_interface(I_OBJECTS)
chat = get_interface(I_CHAT)

#read scoring from fg_ctf (in chat?) and toggle objects
def MSG_ARENA(arena):
   arena. = ( + 1)
   return = none

#when flag game is reset, toggle objects to make sb read 0

def mm_attach(arena):
   arena.sb_ref1 = reg_callback(MSG_ARENA, arena)
   arena.sb_ref2 = reg_callback (CB_FLAGREST, arena *a, int freq, int points)

def mm_detach(arena):
   arena.sb_ref1 = None
   arena.sb_ref2 = None

Anonymous - Wed Oct 27, 2010 4:29 pm
Post subject:
So another option is maybe to edit the source for fg_ctf to toggle the images.

It only needs to toggle 8 images.

2 for when the flag game resets, which with both be 0's

Then toggle the other images on team 1 and 2 captures.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group