AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Using vprof to debug plugin actions after mapchange (https://forums.alliedmods.net/showthread.php?t=312338)

zipcore 11-27-2018 10:03

Using vprof to debug plugin actions after mapchange
 
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;



Neuro Toxin 11-27-2018 15:39

Re: Using vprof to debug plugin actions after mapchange
 
Wouldnt your start the timer onmapend and stop it on the first player spawn into a team?

Lubricant Jam 11-30-2018 10:06

Re: Using vprof to debug plugin actions after mapchange
 
Quote:

Originally Posted by Neuro Toxin (Post 2625903)
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.


All times are GMT -4. The time now is 07:41.

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