This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Player FPS Display [0.7.1]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
shine771
Senior Member
Join Date: Jun 2007
Old 04-17-2009 , 17:55   Player FPS Display [0.7.1]
Reply With Quote #1

Player FPS Display
[0.7.1]


- Description -

This plugin shows player FPS(Frames per second) as deaths. Useful for KZ and other mods where player death count is useless.

- Cvars -

Quote:
amx_fps_display < 1 / 0 > < On / Off >
- Screenshots -

[IMG]http://img19.**************/img19/9339/scr1t.th.jpg[/IMG]

- Change log -

Code:
0.7.0
* Initial Release

0.7.1
* Little code optimization
Attached Files
File Type: sma Get Plugin or Get Source (player_fps.sma - 2319 views - 2.3 KB)

Last edited by shine771; 04-26-2009 at 05:23.
shine771 is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-17-2009 , 18:01   Re: Player FPS Display
Reply With Quote #2

Hey, well done (although I'm wondering how accurate this is?).

Things you should/could change:

- Cache is_user_connected
- Why not use cs_set_user_deaths?
- Can't you give the ent a unique name so you can hook it exclusively (skip checks). (read joa's post for this)
__________________
In Flames we trust!

Last edited by Nextra; 04-17-2009 at 18:03.
Nextra is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-17-2009 , 18:01   Re: Player FPS Display
Reply With Quote #3

Nice

PHP Code:
new Ent engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target")) 
Make it global. Then:

Change

Code:
public PlayerFPSHandlerThink(Ent) {
    
    if(pev_valid(Ent) && pev(Ent,pev_iuser4) == HANDLER_ID) {
to
PHP Code:
public PlayerFPSHandlerThink(ent) {
    
    if(
ent == Ent) { 
__________________
joaquimandrade is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-17-2009 , 18:08   Re: Player FPS Display
Reply With Quote #4

That is not how you retrieve player fps.
That is more of the server's fps.

http://forums.alliedmods.net/showthr...&highlight=fps
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-17-2009 , 18:08   Re: Player FPS Display
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
That is not how you retrieve player fps.
That is more of the server's fps.

http://forums.alliedmods.net/showthr...&highlight=fps
I thought about that also. But it would be nice if it worked.

I read that here:

http://forums.alliedmods.net/showpos...0&postcount=28
__________________

Last edited by joaquimandrade; 04-17-2009 at 18:11.
joaquimandrade is offline
shine771
Senior Member
Join Date: Jun 2007
Old 04-17-2009 , 18:24   Re: Player FPS Display [0.7.1]
Reply With Quote #6

Quote:
cs_set_user_deaths
1. Sucks...
2. This isn't CS only.

Quote:
That is not how you retrieve player fps.
That is more of the server's fps.
If server fps is normal, you should get a normal output too.

Returns 0.0 for me.

PHP Code:
public PlayerFPSHandlerThink(ent) {
    
    if(
ent == Ent) { 
Didn't though about that method, because i have always used pev_iuser4 to detect info_target entities. Updated. Thanks .
shine771 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-17-2009 , 19:27   Re: Player FPS Display [0.7.1]
Reply With Quote #7

Quote:
Originally Posted by shine771 View Post
Returns 0.0 for me.
Are you referring to the msec values?
If so, did you test both pev_pushmsec and UC_Msec?

Even if those don't work, the PreThink still is wrong.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
shine771
Senior Member
Join Date: Jun 2007
Old 04-17-2009 , 19:58   Re: Player FPS Display [0.7.1]
Reply With Quote #8

Quote:
Are you referring to the msec values?
If so, did you test both pev_pushmsec and UC_Msec?
Yes.

Quote:
Even if those don't work, the PreThink still is wrong.
Have you got a better idea besides Msec?
As far as i understand, while server fps is larger than 100, it'll show player fps correctly. I can't image a server with <100 fps...
shine771 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-17-2009 , 20:01   Re: Player FPS Display [0.7.1]
Reply With Quote #9

net_graph 3
__________________
fysiks is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-17-2009 , 20:02   Re: Player FPS Display [0.7.1]
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
net_graph 3
All players
__________________
joaquimandrade is offline
Reply



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 18:21.


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