nony Posted November 9, 2012 Share Posted November 9, 2012 السلام عليكم ورحمه الله وبركاته يا شباب وش الخطأ في ذا الكود playerFPS = guiCreateLabel(10,102,300,20,'',false,GUIEditor_Tab[1]) guiLabelSetColor(playerFPS,255,255,0) addEventHandler("onClientRender",root, function() guiSetText(playerFPS,"Your FPS: "..getTickCount(localPlayer) ) end) هو شغال بس يزود من 1 ومايوقف كانه رقم يزود ومايوقف وصل عندي 100 الف ................. وش اضيف بدال getTickCount توني ضغت عليها وعرفت انها مو حقت الفبس Link to comment
nony Posted November 9, 2012 Author Share Posted November 9, 2012 يا شباب مطلبت شي صعب بس ابي كود فبس مثلا ذا البنق ابي زيه بس للفبس getPlayerPing getPlayerFPS Link to comment
TD[M]ER Posted November 9, 2012 Share Posted November 9, 2012 والله ي الحبيب مالي خبرة وما ودي افتي لكـ ولكن فيه مود الاف بي اس موجود اساسا تقدر تاخذ منه الكود وفمان الله =] Link to comment
3NAD Posted November 9, 2012 Share Posted November 9, 2012 في منه جاهز كثيير على شكل ليبل و فيه على السكور FPS الـ ابحث تلقى Link to comment
nony Posted November 9, 2012 Author Share Posted November 9, 2012 في منه جاهز كثيير على شكل ليبل و فيه على السكور FPS الـ ابحث تلقى يب لقيته عندي كود الفبس لقيت ذا الكود getTickCount مافي الا ذا الكود وبس Link to comment
abu5lf Posted November 9, 2012 Share Posted November 9, 2012 https://community.multitheftauto.com/index.php?p= ... ils&id=450 Link to comment
nony Posted November 9, 2012 Author Share Posted November 9, 2012 مافهمت شي يا عاشق الشرق من المود تكفا الله يخليك سوه لي playerFPS = guiCreateLabel(10,102,300,20,'',false,GUIEditor_Tab[1]) guiLabelSetColor(playerFPS,255,255,0) addEventHandler("onClientRender",root, function() guiSetText(playerFPS,"Your FPS: "..getTickCount(localPlayer) ) end) Link to comment
MR.S3D Posted November 9, 2012 Share Posted November 9, 2012 جرب ذا كلنت local root = getRootElement() local player = getLocalPlayer() local counter = 0 local starttick local currenttick playerFPS = guiCreateLabel(10,102,300,20,'',false,GUIEditor_Tab[1]) guiLabelSetColor(playerFPS,255,255,0) 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 guiSetText(playerFPS,"Your FPS: "..tonumber(getElementData(localPlayer,"fps")) or 0 ) end ) Link to comment
abu5lf Posted November 9, 2012 Share Posted November 9, 2012 local v = 0 local i local c addEventHandler ( 'onClientRender', getRootElement ( ), function ( ) if not ( i ) then i = getTickCount ( ) end v = v + 1 c = getTickCount ( ) if ( c - i >= 1000 ) then setElementData ( getLocalPlayer ( ), 'fps', v ) v = 0 i = false end end ) function getPlayerFPS ( player ) return getElementData ( player, 'fps' ) or false end playerFPS = guiCreateLabel ( 10, 102, 300, 20, 'FPS:', false, GUIEditor_Tab[1] ) guiLabelSetColor ( playerFPS, 255, 255, 0 ) addEventHandler ( 'onClientRender', getRootElement ( ), function ( ) guiSetText ( playerFPS, 'FPS:'..tonumber ( getPlayerFPS ( getLocalPlayer ( ) ) ) ) end ) جربته وشغال ذحين تقدر تجيب فبس الاعب من الفنكشن التالي getPlayerFPS ( player ) Link to comment
nony Posted November 9, 2012 Author Share Posted November 9, 2012 عاشق الكود اشتغل تسلم بس يجيني بالاحمر كذا ERROR: shop\client.lua:72: attempt to concatenate a nil value وش ذا؟ Link to comment
MR.S3D Posted November 9, 2012 Share Posted November 9, 2012 عاشق الكود اشتغل تسلم بس يجيني بالاحمر كذا ERROR: shop\client.lua:72: attempt to concatenate a nil value وش ذا؟ local v = 0 local i local c addEventHandler ( 'onClientRender', getRootElement ( ), function ( ) if not ( i ) then i = getTickCount ( ) end v = v + 1 c = getTickCount ( ) if ( c - i >= 1000 ) then setElementData ( getLocalPlayer ( ), 'fps', v ) v = 0 i = false end end ) function getPlayerFPS ( player ) return getElementData ( player, 'fps' ) or 0 end playerFPS = guiCreateLabel ( 10, 102, 300, 20, 'FPS:', false, GUIEditor_Tab[1] ) guiLabelSetColor ( playerFPS, 255, 255, 0 ) addEventHandler ( 'onClientRender', getRootElement ( ), function ( ) guiSetText ( playerFPS, 'FPS:'..tonumber ( getPlayerFPS ( getLocalPlayer ( ) ) ) ) end ) Link to comment
nony Posted November 9, 2012 Author Share Posted November 9, 2012 كفو سعد + عاشق الشرق اشتغل تمام %100 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now