Mbtdaa Posted January 28, 2014 Share Posted January 28, 2014 (edited) السلام عليكم كيفكم يازقرت ! ان شاءالله طيبون حبيت اعرف وش الغلط الي اركتبته بكتابة الكود function Map () local Map = getMapName() guiSetText(GUIEditor_Label[13]," "..getMapName()) if Map and Map ~= "None" then end end addEventHandler("onClientRender", Map) ملاحظة : عدلت اخطاء واجهتني ببرنامج ام تي اي Edited January 28, 2014 by Guest Link to comment
iPrestege Posted January 28, 2014 Share Posted January 28, 2014 الكود ماله اي معنى و مخبص وش تبي تسوي بالضبط؟ Link to comment
Mbtdaa Posted January 28, 2014 Author Share Posted January 28, 2014 اما مخبص ياليل *_* انا الي ابيه انه اخلي اللبل يظهر اسم الماب Link to comment
!#NssoR_) Posted January 28, 2014 Share Posted January 28, 2014 (edited) ججرب # function Map () local mapName = getMapName() if mapName ~= "None" then guiSetText(GUIEditor_Label[1],""..mapName.."" ) end end addEventHandler("onClientRender",root, Map) Edited January 28, 2014 by Guest Link to comment
iPrestege Posted January 28, 2014 Share Posted January 28, 2014 ججرب # function Map () local mapName = getMapName() if mapName ~= "None" then guiSetText(GUIEditor_Label[1],""..mapName.."" ) end end addEventHandler("onClientRender",root, Map) كلنت + سيرفر ؟ .. ي صاحب الموضوع تستخدم قيم الريس؟ Link to comment
Mbtdaa Posted January 28, 2014 Author Share Posted January 28, 2014 نفس الشي ياذيبان ماصار شي,, Link to comment
Mbtdaa Posted January 28, 2014 Author Share Posted January 28, 2014 اية اخوي استخدم الريس Link to comment
!#NssoR_) Posted January 28, 2014 Share Posted January 28, 2014 لوووووول مانتبهت لـ كود الماب نيم ><" لازم تراايقر ي صاحب الموضوع Link to comment
Mbtdaa Posted January 28, 2014 Author Share Posted January 28, 2014 (edited) مممم التريقر مشكلة على العموم بحاول واشوف وش يسير معي ويعطيكم العافية على التوضيح Edited January 28, 2014 by Guest Link to comment
Mbtdaa Posted January 28, 2014 Author Share Posted January 28, 2014 كلينت function Map() local Map = getMapName() triggerServerEvent('MapName', localPlayer) end addEventHandler("onClientRender", Map) سيرفر addEvent('MapName', true) addEventHandler('MapName', localPlayer, function Map() guiSetText(GUIEditor_Label[13]," "..getMapName()) if Map and Map ~= "None" then end Link to comment
iPrestege Posted January 28, 2014 Share Posted January 28, 2014 جرب ذآ .. Server Side : addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then setElementData ( resourceRoot,'GetMapName',tostring ( getResourceInfo ( resource,'name' ) or 'N/A' ) ) end end ) Client Side : addEventHandler ( 'onClientRender',root, function ( ) local MapName = getElementData ( resourceRoot,'GetMapName' ) if MapName and MapName ~= false then guiSetText ( GUIEditor_Label[13],MapName ) end end ) Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 نفس الحكاية * ماصار شي يابعدي Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 /debugscript 3 لاني جربتة شغال عندي مود الريس .. و شغلت ماب وضابط معي تمام زي الفل ذذ .. Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 ابجرب debugscript 3 واشوف Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 ابجرب debugscript 3واشوف شغال تمام : http://im38.gulfup.com/0DGVm.png Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 WARINIG:uz\2.lua:42:Bad argument @ 'addEventHandler"[Expected element at argument 2 .got function Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 ورني السطر 42 من الملف 2.lua عندكـ .. Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 if MapName and MapName ~= false then Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 اعتقد عندك فنكشن يتعارض معه عموماً جرب خلي هذا كذا : addEventHandler ( 'onClientRender',root, function ( ) local xxMapName = getElementData ( resourceRoot,'GetMapName' ) if xxMapName and xxMapName ~= false then guiSetText ( GUIEditor_Label[13],xxMapName ) end end ) Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 جربت ونفس الحكاية @ Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 /debugscript 3 صور لي الشاشة واطرح الكود كامل . Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 جربت اسوي نافذة جديده عشان اعرف من وين الخطء كلنت GUIEditor = { label = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(509, 214, 326, 279, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(45, 63, 202, 91, "map", false, GUIEditor.window[1]) bindKey ( "F2" , "down" , function () if guiGetVisible ( GUIEditor.window[1] , true ) then guiSetVisible ( GUIEditor.window[1] , false ) showCursor ( false ) else guiSetVisible ( GUIEditor.window[1] , true ) showCursor ( true ) end end ) addEventHandler ( 'onClientRender',root, function ( ) local MapName = getElementData ( resourceRoot,'GetMapName' ) if MapName and MapName ~= false then guiSetText ( GUIEditor_Label[1],MapName ) end end ) سيرفر addEventHandler ( 'onResourceStart',root, function ( resource ) if getResourceInfo ( resource,'gamemodes' ) == 'race' and getResourceInfo ( resource,'type' ) == 'map' then setElementData ( resourceRoot,'GetMapName',tostring ( getResourceInfo ( resource,'name' ) or 'N/A' ) ) end end ) + لما اشغله وافك الديبوج مايجيني اخطاء من السكربت ! Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 شغل ماب وشوف يطلع اسمها باللبل ولالا .. المفترض يظهر ! Link to comment
Mbtdaa Posted January 29, 2014 Author Share Posted January 29, 2014 (edited) اعذرني المره الاولة كان في مشاكل بممود الريس نفسه وغيرته وجاتني مشاكل السكربت ! Edited January 29, 2014 by Guest Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 اعذرني المره الاولة كان في مشاكل بممود الريس نفسه وغيرته وجاتني مشاكل السكربت ! لانة اللبل غير معرف ! GUIEditor = { label = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(509, 214, 326, 279, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(45, 63, 202, 91, "map", false, GUIEditor.window[1]) bindKey ( "F2" , "down" , function () if guiGetVisible ( GUIEditor.window[1] , true ) then guiSetVisible ( GUIEditor.window[1] , false ) showCursor ( false ) else guiSetVisible ( GUIEditor.window[1] , true ) showCursor ( true ) end end ) addEventHandler ( 'onClientRender',root, function ( ) local MapName = getElementData ( resourceRoot,'GetMapName' ) if MapName and MapName ~= false then guiSetText ( GUIEditor.label[1],MapName ) end end ) 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