RdX Posted June 25, 2013 Share Posted June 25, 2013 السلام عليكم شباب انا سويت Gridlist , coloumn , guiGridListSetSelectionMode لكن انا ابي تطلع مابات الريس في gridlist مثال ارجو المساعدة Link to comment
Tete omar Posted June 25, 2013 Share Posted June 25, 2013 getResources getResourceInfo وسوي عليهم لوب Link to comment
hassan.k.s.a Posted June 26, 2013 Share Posted June 26, 2013 Map_s = { } function UpMapsToTable() for i,v in ipairs (getResources()) do name = getResourceName(v) if string.find ( name, "[DM]", 1, true ) then--على حسب القيم للماب راح يبحث عن اسم الماب الي بدايته كذا DDاذا تبي ديربي حط table.insert(Map_s,name) end end end UpMapsToTable() الي عليك تستخرج كل الي بالجدول وترسله لكلينت وترفعه بالسته , طبعا ذا الكود سهل اذا كان ودك تطلع مابات لقيم معين ديربي او شوتر الخ , Link to comment
3NAD Posted June 26, 2013 Share Posted June 26, 2013 ^ لو تكرر تشغيل الوظيفة راح يكرر إدخال المابات في الجدول Link to comment
hassan.k.s.a Posted June 26, 2013 Share Posted June 26, 2013 كذا راح يثبت المابات لما يشتغل المود بس لما يسوي رستارت راح تنحذف القيم من الجدول وتتثبت من جديد , يعني مايحتآج غير يجلب القيم الي بالجدول ويرسلها لكلينت ويرفعها بالسته . Map_s = { } function UpMapsToTable() for i,v in ipairs (getResources()) do name = getResourceName(v) if string.find ( name, "[DM]", 1, true ) then table.remove(Map_s,name) table.insert(Map_s,name) end end end UpMapsToTable() كذا لما يركب ماب مايحتآج يسوي رستارت للمود يستخدم الوظيفه وينرفع الماب , Link to comment
3NAD Posted June 26, 2013 Share Posted June 26, 2013 فنكشن جديد getMaps ( type ) - type = "DM" or "DD" .... etc Enad = { }; getMaps = function ( value ) if value then Enad[value] = { } for i, v in ipairs ( getResources ( ) ) do local resourceName = getResourceName ( v ) if string.find ( string.upper ( resourceName ), "["..value.."]", 1, true ) then table.insert ( Enad[value], { MapName = resourceName } ) end end return Enad[value] end end Ex.: addEventHandler ( "onResourceStart", resourceRoot, function ( ) local Maps = getMaps ( "DM" ) if #Maps > 0 then for i = 1, #Maps do if Maps [ i ] then outputChatBox ( Maps [ i ].MapName, root, 255, 255, 0, true ) end end else outputChatBox ( "* There are no maps", root, 255, 0, 0, true ) end end ) Link to comment
|Mr|-Talal07-| Posted June 26, 2013 Share Posted June 26, 2013 صعبتوها و هي سهله كذاا function getRaceMaps() local maps = {} for _,res in ipairs(getResources()) do if getResourceInfo(res,"type") == "map" then if getResourceInfo(res,"gamemodes") == "race" then table.insert(maps,getResourceInfo(res,"name")) end end end return maps 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