Mbtdaa Posted January 28, 2014 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
iPrestege Posted January 28, 2014 Posted January 28, 2014 الكود ماله اي معنى و مخبص وش تبي تسوي بالضبط؟
Mbtdaa Posted January 28, 2014 Author Posted January 28, 2014 اما مخبص ياليل *_* انا الي ابيه انه اخلي اللبل يظهر اسم الماب
!#NssoR_) Posted January 28, 2014 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
iPrestege Posted January 28, 2014 Posted January 28, 2014 ججرب # function Map () local mapName = getMapName() if mapName ~= "None" then guiSetText(GUIEditor_Label[1],""..mapName.."" ) end end addEventHandler("onClientRender",root, Map) كلنت + سيرفر ؟ .. ي صاحب الموضوع تستخدم قيم الريس؟
!#NssoR_) Posted January 28, 2014 Posted January 28, 2014 لوووووول مانتبهت لـ كود الماب نيم ><" لازم تراايقر ي صاحب الموضوع
Mbtdaa Posted January 28, 2014 Author Posted January 28, 2014 (edited) مممم التريقر مشكلة على العموم بحاول واشوف وش يسير معي ويعطيكم العافية على التوضيح Edited January 28, 2014 by Guest
Mbtdaa Posted January 28, 2014 Author 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
iPrestege Posted January 28, 2014 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 )
iPrestege Posted January 29, 2014 Posted January 29, 2014 /debugscript 3 لاني جربتة شغال عندي مود الريس .. و شغلت ماب وضابط معي تمام زي الفل ذذ ..
iPrestege Posted January 29, 2014 Posted January 29, 2014 ابجرب debugscript 3واشوف شغال تمام : http://im38.gulfup.com/0DGVm.png
Mbtdaa Posted January 29, 2014 Author Posted January 29, 2014 WARINIG:uz\2.lua:42:Bad argument @ 'addEventHandler"[Expected element at argument 2 .got function
iPrestege Posted January 29, 2014 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 )
iPrestege Posted January 29, 2014 Posted January 29, 2014 /debugscript 3 صور لي الشاشة واطرح الكود كامل .
Mbtdaa Posted January 29, 2014 Author 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 ) + لما اشغله وافك الديبوج مايجيني اخطاء من السكربت !
iPrestege Posted January 29, 2014 Posted January 29, 2014 شغل ماب وشوف يطلع اسمها باللبل ولالا .. المفترض يظهر !
Mbtdaa Posted January 29, 2014 Author Posted January 29, 2014 (edited) اعذرني المره الاولة كان في مشاكل بممود الريس نفسه وغيرته وجاتني مشاكل السكربت ! Edited January 29, 2014 by Guest
iPrestege Posted January 29, 2014 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 )
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