View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-06-2016 , 16:09   Re: Scoring system and database
Reply With Quote #4

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(idpoints[id])
        
cs_set_user_deaths(idlevel[id])
    }

OciXCrom is offline
Send a message via Skype™ to OciXCrom