Raised This Month: $12 Target: $400
 3% 

Using vprof to debug plugin actions after mapchange


Post New Thread Reply   
 
Thread Tools Display Modes
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
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 11-27-2018 , 15:39   Re: Using vprof to debug plugin actions after mapchange
Reply With Quote #2

Wouldnt your start the timer onmapend and stop it on the first player spawn into a team?
__________________
Neuro Toxin is offline
Lubricant Jam
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 11-30-2018 , 10:06   Re: Using vprof to debug plugin actions after mapchange
Reply With Quote #3

Quote:
Originally Posted by Neuro Toxin View Post
Wouldnt your start the timer onmapend and stop it on the first player spawn into a team?
Worked perfectly fine for what I needed when I asked him at the time but that is another method of doing it.
Lubricant Jam is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode