That's exactly what I'm talking about. Simply register the event:
PHP Code:
register_event("ScoreInfo", "update_scoreboard", "a")
... and change the frags/deaths every time the event is called. You may want to add a little delay (0.1), I believe I was having problems without one.
PHP Code:
public update_scoreboard()
{
static id
id = read_data(1)
set_task(0.1, "set_scoreboard", id)
}
public set_scoreboard(id)
{
if(is_user_connected(id))
{
set_user_frags(id, points[id])
cs_set_user_deaths(id, level[id])
}
}