Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: COD4 : getting clients com_maxfps questions

  1. #1
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy COD4 : getting clients com_maxfps questions

    Hello


    i'm trying to display the fps of the player that you're spectating in COD4 cj mod as you know most jumps takes many fps switches and different Technics
    so this will benefit every cj player in the server
    example :

    Click image for larger version. 

Name:	shot0002.jpg 
Views:	121 
Size:	305.4 KB 
ID:	1091


    my questions are the following :

    1- can getUserInfo("com_maxfps") be used without Clientcmd menu ? and if possible how ?

    2- is there any source for COD4 CJ mod or a CJ MOD with clientmenu already in it ?

    3- is there any other way to get client fps ?

    4- unrelated question any one by any change have the speedometer script (the numbers showing in the bottom of the photo are the curent speed which is changing and the max speed reached which changes only if you reach a higher speed then you did before ) ?

    running 1.7a win64

    thanks

  2. #2
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hello ? is this forum alive ?

  3. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    There are already two threads about this:

    https://killtube.org/showthread.php?...how-FPS-in-Hud

    However this one won't work with 1.7a, because you can't run libcod and 1.7a together.
    https://killtube.org/showthread.php?...l-fps-realtime

    Edit:
    Quote Originally Posted by se891 View Post
    4- unrelated question any one by any change have the speedometer script (the numbers showing in the bottom of the photo are the curent speed which is changing and the max speed reached which changes only if you reach a higher speed then you did before ) ?
    Something like this?
    PHP Code:
    calculatePlayerSpeed() {
        
    speed distance(self.originself.previousorigin); // or DistanceSquared (= cheaper/faster function)
        
    self.previousorigin self.origin;
        return 
    speed;

    Call this every frame (or in the same time interval) then you will get the distance between current origin and previous origin.
    Last edited by Mitch; 8th May 2016 at 13:05.

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    You know that thread you linked by me got inspired by stuff inside cod4x...

    Better to just getuserinfo() the stuff with setu
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #5
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Mitch View Post
    There are already two threads about this:

    https://killtube.org/showthread.php?...how-FPS-in-Hud

    However this one won't work with 1.7a, because you can't run libcod and 1.7a together.
    https://killtube.org/showthread.php?...l-fps-realtime

    Edit:


    Something like this?
    PHP Code:
    calculatePlayerSpeed() {
        
    speed distance(self.originself.previousorigin); // or DistanceSquared (= cheaper/faster function)
        
    self.previousorigin self.origin;
        return 
    speed;

    Call this every frame (or in the same time interval) then you will get the distance between current origin and previous origin.
    thnx for the speedometer

    as for the threads about fps .. those won't work for cod4

  6. #6
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by IzNoGoD View Post
    You know that thread you linked by me got inspired by stuff inside cod4x...

    Better to just getuserinfo() the stuff with setu
    no one uses setu meaning it won't show the fps for most if not all the users in the server
    it can be done without clientcmd menu but i have no idea how and i'm losing my mind over it

    the server in the screenshot i provided with the post is from 3xp Codjumper server .. thier mod doesn't have clientcmd.menu and still displays players fps no problems
    i tried to buy the full mod even tried to buy the stock codjumper source files to added clientcmd.menu and other features and no one willing to even reply
    after hours of searching this is the only active fourm i found with people that know what they're talking about and willing to help

    so you're my last hope
    Last edited by se891; 9th May 2016 at 06:11.

  7. #7
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by IzNoGoD View Post
    You know that thread you linked by me got inspired by stuff inside cod4x...

    Better to just getuserinfo() the stuff with setu
    let me explain more

    getuserinfo will work if the client uses setu com_maxfps or the server forces the client to do setu com_maxfps when the client connects to the server
    i don't know of any other way to do setu than using clientcmd menu which will look like this

    player clientcmd("setu com_maxfps 250" );

    is there other way to do setu com_maxfps in onconnectplayer() without clientcmd ?

    thanks

  8. #8
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    why not just do something like this?
    PHP Code:
    player clientcmd("setfromdvar temp com_maxfps; setu com_maxfps 124; wait 1; setu com_maxfps 125; wait 1; setfromdvar com_maxfps temp"); 
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  9. #9
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by IzNoGoD View Post
    why not just do something like this?
    PHP Code:
    player clientcmd("setfromdvar temp com_maxfps; setu com_maxfps 124; wait 1; setu com_maxfps 125; wait 1; setfromdvar com_maxfps temp"); 
    clientcmd requiers the mod to have clientcmd.menu compiled in it
    the problem cod jumper doesn't have that menu
    which is why i was asking can you do it WITHOUT clientcmd menu

  10. #10
    ... connecting
    Join Date
    Apr 2016
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Mitch View Post

    Something like this?
    PHP Code:
    calculatePlayerSpeed() {
        
    speed distance(self.originself.previousorigin); // or DistanceSquared (= cheaper/faster function)
        
    self.previousorigin self.origin;
        return 
    speed;

    Call this every frame (or in the same time interval) then you will get the distance between current origin and previous origin.
    can you make the script show the speed without the tenths
    meaning if my speed is 534.03431 i want it to show 543 only since the tenths don't matter

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •