Raised This Month: $ Target: $400
 0% 

[SOLVED]User info


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-31-2009 , 16:10   Re: User info
Reply With Quote #1

http://forums.alliedmods.net/showthread.php?t=66890
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-31-2009 , 16:35   Re: User info
Reply With Quote #2

And what about 1/(0.001*pushmsec) ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-31-2009 , 16:38   Re: User info
Reply With Quote #3

Omg, this is awesome btw how can i use this?

hmm... there is no tut. how can i print user fps?its to high 4 me
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-31-2009 , 16:39   Re: User info
Reply With Quote #4

Quote:
Originally Posted by One View Post
Omg, this is awesome btw how can i use this?

hmm... there is no tut. how can i print user fps?its to high 4 me
Question was about the accuracy of the method, but you can try to print this in CmdStart :

client_print(id, print_center, "%.1f", 1.0/(0.001*pev(id, pev_pushmsec)))
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-31-2009 at 16:42.
ConnorMcLeod is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-31-2009 , 16:44   Re: User info
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
Question was about the accuracy of the method, but you can try to print this in CmdStart :

client_print(id, print_center, "%.1f", 1.0/(0.001*pev(id, pev_pushmsec)))
ok, Ty. ill test this tomorrow. i hope this works or better said "ma code work"
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 04-01-2009 , 11:12   Re: User info
Reply With Quote #6

Right, you can get a fairly accurate value that way.

Only you should use get_uc( handle, UC_Msec ) instead.
__________________
MeRcyLeZZ is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-01-2009 , 11:14   Re: User info
Reply With Quote #7

I've never heard of these msec values. Good find Connor and Mercylezz
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-20-2009 , 08:31   Re: User info
Reply With Quote #8

Quote:
Originally Posted by Exolent[jNr] View Post
exolent?? i tried this one but i have only error :

g_fps[id][g_i[id]] == g_i[id][10]

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Expression has no effect on line 822
Error
Expected token";"but found "[" on line 822
Error
Invalid expressionassumed zero on line 822
Warning
Expression has no effect on line 822
Error
Expected token";"but found "]" on line 822
Error
Too many error messages on one line on line 822

Compilation aborted
.
3 Errors.
Could not locate output file C:\Programme\Steam\steamapps\cpl_one\counter-strike\cstrike\addons\amxmodx\plugins\Untitled.amx (compile failed). 
could u please write anyone for me so that i can print the real fps?just new real_fps.... or somthing like this.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-20-2009 , 21:35   Re: User info
Reply With Quote #9

Quote:
Originally Posted by One View Post
could u please write anyone for me so that i can print the real fps?
If it could been done it would have been done before.
__________________
fysiks is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-20-2009 , 21:51   Re: User info
Reply With Quote #10

The way that I linked to you is inaccurate and you would have found that out if you read the thread.
According to Connor and Mercylezz, this should work:
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> // 1/(0.001*x) = 1/(1/100*x) = 1/(x/100) = 100/x #define get_user_fps(%1) (100.0 / float(g_fps[%1])) new g_fps[33]; new g_maxclients; public plugin_init() {     register_forward(FM_UpdateClientData, "FwdUpdateData");         g_maxclients = get_maxplayers(); } public FwdUpdateData(entity, iSendWeapons, cd_handle) {     if( 1 <= entity <= g_maxclients )     {         g_fps[entity] = get_cd(cd_handle, CD_PushMsec);     } } // your code: public function(client) {     new Float:fps = get_user_fps(client); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 02:20.


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