Jump to content

[Help]FPS


Recommended Posts

Hello Guys!

mana ya scripts community sa download ki hai, ya fps scoreboard mai show kartha hai lakin ya kuch bhi show nahi kar raha kyun? no error in debugscript 3

Client

local root = getRootElement() 
local player = getLocalPlayer() 
local counter = 0 
local starttick 
local currenttick 
addEventHandler("onClientRender",root, 
    function() 
        if not starttick then 
            starttick = getTickCount() 
        end 
        counter = counter + 1 
        currenttick = getTickCount() 
        if currenttick - starttick >= 1000 then 
            setElementData(player,"fps",counter) 
            counter = 0 
            starttick = false 
        end 
    end 
) 

Server

addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), 
    function() 
        call(getResourceFromName("scoreboard"),"addScoreboardColumn","FPS") 
    end 
) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...