View Single Post
Author Message
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 11-27-2018 , 10:03   Using vprof to debug plugin actions after mapchange
Reply With Quote #1

Someone asked me yesterday how he can use vprof to see whats happening directly after mapchange and maybe someone else finds this solution usefull.

PHP Code:
public void OnMapStart()
{
    
ServerCommand("sm prof start");
    
    
CreateTimer(60.0Stopit_TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Stopit(Handle timer)
{
    
ServerCommand("sm prof stop");
    
ServerCommand("con_logfile vprof.log");
    
ServerCommand("sm prof dump vprof");
    
ServerCommand("con_logfile \"\"");
    
    return 
Plugin_Handled;

__________________
zipcore is offline