AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need Code for Detecting Game Minimize (https://forums.alliedmods.net/showthread.php?t=240250)

souvikdas95 05-11-2014 13:14

Need Code for Detecting Game Minimize
 
Is it possible to detect if a player has just minimised his cs 1.6 window?

fysiks 05-11-2014 13:22

Re: Need Code for Detecting Game Minimize
 
No.

souvikdas95 05-11-2014 13:42

Re: Need Code for Detecting Game Minimize
 
Actually something happens... whenever a player minimizes, his rates change... now, we can detect player fps change using uc... but i was thinking if der is some specific parameter that is set at player minimize ( rates )... which can be used to hook it... if you can check?

I have only observed it... the "net_graph 1" shows a little zig-zag when i minimize the window and come back... that's why i am saying something changes in the rates of player...

UPDATE: I observed that the FPS downcaps to around 30 fps on minimize... but we can't simply check player fps because one may even lag ( bad graphics card ) which can cause such drop while no minimized... so i want to hook what sets this cap when a player minimizes...

But again... it's not the only parameter that changes... something else also changes that leads to a huge difference in "net_graph 1" of player

UPDATE: Even All +<command> changes to -<command> eg. attack, voicerecord, etc on minimize...

fysiks 05-11-2014 13:45

Re: Need Code for Detecting Game Minimize
 
It's not possible to determine a player's frame rate (FPS).

souvikdas95 05-11-2014 13:50

Re: Need Code for Detecting Game Minimize
 
fysiks... come on mahn? O.o Even you don't know? LOL

PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init ( )
     
register_forward FM_CmdStart"FM_CmdStart_forward" );

public 
FM_CmdStart_forward idhandle )
     
client_print idprint_center"%d FPS"floatround / ( get_uc handleUC_Msec ) * 0.001 ) ) ); 


YamiKaitou 05-11-2014 15:30

Re: Need Code for Detecting Game Minimize
 
Quote:

Originally Posted by souvikdas95 (Post 2136441)
fysiks... come on mahn? O.o Even you don't know? LOL

PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init ( )
     
register_forward FM_CmdStart"FM_CmdStart_forward" );

public 
FM_CmdStart_forward idhandle )
     
client_print idprint_center"%d FPS"floatround / ( get_uc handleUC_Msec ) * 0.001 ) ) ); 


You cannot accurately get the client's FPS

souvikdas95 05-11-2014 16:51

Re: Need Code for Detecting Game Minimize
 
the difference won't be high... i mean come on... frames per second is a really time demanding property... even if we get a near to original frames... it's still good enough for most of the purposes :)

meTaLiCroSS 05-11-2014 21:13

Re: Need Code for Detecting Game Minimize
 
1) Why does the game need to know that?
2) Why client should let know game about that?

souvikdas95 05-11-2014 23:33

Re: Need Code for Detecting Game Minimize
 
@meTaLiCroSS - I wish I knew... Then I wouldn't have opened this thread :\ The thing is there are many alternatives to detect it though not a single specific named hook... I just shared whatever I experienced playing... Only out of curiosity I asked.


All times are GMT -4. The time now is 09:48.

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