Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 local x, y = guiGetScreenSize() شيل ذا وجرب Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 2 minutes ago, Abu-Solo said: local x, y = guiGetScreenSize() شيل ذا وجرب ERROR:chato\c.lua:4: attempt to perform arithmetic on global 'x' (a nil value) Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 Just now, kokoseda said: ERROR:chato\c.lua:4: attempt to perform arithmetic on global 'x' (a nil value) جيب كودك كامل Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 Just now, Abu-Solo said: جيب كودك كامل Show = false local rx, ry = (x/800), (y/600) function lo7h() dxDrawRectangle(rx*482, ry*206, rx*318, ry*233, tocolor(238, 15, 31, 255), false) dxDrawRectangle(rx*558, ry*296, rx*150, ry*51, tocolor(36, 218, 216, 255), false) dxDrawText("hide/show chat", rx*577, ry*314, rx*688, ry*337, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end bindKey ( "F9", "down", function ( ) if Show == false then removeEventHandler("onClientRender", root,lo7h) Show = true else addEventHandler("onClientRender", root,lo7h) Show = false end end ) Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 local x, y = guiGetScreenSize() local rx, ry = (x/800), (y/600) function lo7h() dxDrawRectangle(rx*482, ry*206, rx*318, ry*233, tocolor(238, 15, 31, 255), false) dxDrawRectangle(rx*558, ry*296, rx*150, ry*51, tocolor(36, 218, 216, 255), false) dxDrawText("hide/show chat", rx*577, ry*314, rx*688, ry*337, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end sShowing = false bindKey("f9","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,lo7h) showCursor ( false ) else addEventHandler("onClientRender",root,lo7h) showCursor ( true ) end sShowing = not sShowing end ) Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 2 minutes ago, Abu-Solo said: local x, y = guiGetScreenSize() local rx, ry = (x/800), (y/600) function lo7h() dxDrawRectangle(rx*482, ry*206, rx*318, ry*233, tocolor(238, 15, 31, 255), false) dxDrawRectangle(rx*558, ry*296, rx*150, ry*51, tocolor(36, 218, 216, 255), false) dxDrawText("hide/show chat", rx*577, ry*314, rx*688, ry*337, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end sShowing = false bindKey("f9","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,lo7h) showCursor ( false ) else addEventHandler("onClientRender",root,lo7h) showCursor ( true ) end sShowing = not sShowing end ) ERROR:chato\c.lua:1: attempt to call global 'guiSetScreenSize' (a nil value) Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 1 minute ago, kokoseda said: ERROR:chato\c.lua:1: attempt to call global 'guiSetScreenSize' (a nil value) الكود شغال عندي بدون اي مشاكل انت حاطط الاكواد مع اكواد ثانيه؟ جرب تحط هذي كذا local xx, yy = guiGetScreenSize() Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 (edited) 4 minutes ago, Abu-Solo said: الكود شغال عندي بدون اي مشاكل انت حاطط الاكواد مع اكواد ثانيه؟ لا بس الكلاينت نفس الكود الي عطيتني اياه الاخير والميتا كذا <meta> <script src="c.lua" /> </meta> + 4 minutes ago, Abu-Solo said: جرب تحط هذي كذا local xx, yy = guiGetScreenSize() جربت نفس الخطأ . Edited February 11, 2017 by kokoseda Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 جرب تخلي ذي كذا local xx, yy = guiGetScreenSize() Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 بدل الميتا بهاذا <meta> <script src="c.lua" type="client" /> </meta> لان لو ماحددت الـ type راح يكون سيرفر . Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 Just now, Default said: بدل الميتا بهاذا <meta> <script src="c.lua" type="client" /> </meta> لان لو ماحددت الـ type راح يكون سيرفر . ما شفت الملف حق الميتا حقه, أتوقع تمت الافاده منك ض1 Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 9 minutes ago, Abu-Solo said: جرب تحط هذي كذا local xx, yy = guiGetScreenSize() بدلته لكن نفس المشكله Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 1 minute ago, Default said: بدل الميتا بهاذا <meta> <script src="c.lua" type="client" /> </meta> لان لو ماحددت الـ type راح يكون سيرفر . Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 (edited) #Deleted Please Edited February 11, 2017 by Default Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 1 minute ago, Default said: بدل الميتا بهاذا <meta> <script src="c.lua" type="client" /> </meta> لان لو ماحددت الـ type راح يكون سيرفر . بدلته ونفس الخطأ Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 Just now, kokoseda said: بدلته ونفس الخطأ اكتب في اف 8 refresh وشغل المود من جديد وجرب Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 1 minute ago, Abu-Solo said: اكتب في اف 8 refresh وشغل المود من جديد وجرب جربت طلع الخطأ ذا ERROR: chato\c.lua:2: attempt to perform arithemetic on global 'x' (a nil value) الخطأ الأول راح يوم عدلت الميتا Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 Just now, kokoseda said: جربت طلع الخطأ ذا ERROR: chato\c.lua:2: attempt to perform arithemetic on global 'x' (a nil value) الخطأ الأول راح يوم عدلت الميتا عدلت نفس ما قلت لك؟ local xx, yy = guiGetScreenSize() Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 Just now, ~#[N]exT said: اطرح الميتا والكلينت؟ Client : local xx, yy = guiGetScreenSize() local rx, ry = (x/800), (y/600) function lo7h() dxDrawRectangle(rx*482, ry*206, rx*318, ry*233, tocolor(238, 15, 31, 255), false) dxDrawRectangle(rx*558, ry*296, rx*150, ry*51, tocolor(36, 218, 216, 255), false) dxDrawText("hide/show chat", rx*577, ry*314, rx*688, ry*337, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end sShowing = false bindKey("f9","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,lo7h) showCursor ( false ) else addEventHandler("onClientRender",root,lo7h) showCursor ( true ) end sShowing = not sShowing end ) Meta : <meta> <script src="c.lua" type="client" /> </meta> Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 (edited) 1 minute ago, kokoseda said: Client : local xx, yy = guiGetScreenSize() local rx, ry = (x/800), (y/600) function lo7h() dxDrawRectangle(rx*482, ry*206, rx*318, ry*233, tocolor(238, 15, 31, 255), false) dxDrawRectangle(rx*558, ry*296, rx*150, ry*51, tocolor(36, 218, 216, 255), false) dxDrawText("hide/show chat", rx*577, ry*314, rx*688, ry*337, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end sShowing = false bindKey("f9","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,lo7h) showCursor ( false ) else addEventHandler("onClientRender",root,lo7h) showCursor ( true ) end sShowing = not sShowing end ) Meta : <meta> <script src="c.lua" type="client" /> </meta> شوف سطر رقم 2 خله كذا local rx, ry = (xx/800), (yy/600) , Edited February 11, 2017 by Abu-Solo Link to comment
' A F . Posted February 11, 2017 Share Posted February 11, 2017 بدل سطر 2 بهاذا local rx, ry = (xx/800), (yy/600) Link to comment
kokoseda Posted February 11, 2017 Author Share Posted February 11, 2017 1 minute ago, Default said: بدل سطر 2 بهاذا local rx, ry = (xx/800), (yy/600) اشتغل المود لكنه مو بنص الشاشه Link to comment
Abu-Solo Posted February 11, 2017 Share Posted February 11, 2017 Just now, kokoseda said: اشتغل المود لكنه مو بنص الشاشه عدل ع الاحداثيات , او لما تجي تصمم اللوحة حط setElementPosition = Center, 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