Mostafa MohammeD Posted November 26, 2015 Share Posted November 26, 2015 ابي منكم يا شباب 3 طلبات بمود الفري روم الطلب الاول هو ان اللوحة ابي ارفعها لاعلي قليلا الطلب الثاني لما اختار كلمة الحالات او الملابس يظهر لي كل الكلام بكلمة nill الطلب الثالث ابي اعرف كيف اسوي بحث في لوحة الانتقالاات الاكواد ----------------------- function warpInit() local players = table.map(getElementsByType('player'), function(p) return { name = getPlayerName(p) } end) table.sort(players, function(a, b) return a.name < b.name end) bindGridListToTable(wndWarp, 'playerlist', players, true) end function warpTo(leaf) if not leaf then leaf = getSelectedGridListLeaf(wndWarp, 'playerlist') if not leaf then return end end local player = getPlayerFromNick(leaf.name) if player then server.warpMe(player) end closeWindow(wndWarp) end wndWarp = { 'wnd', text = 'انتقال الى لاعب', width = 300, controls = { { 'lst', id='playerlist', width=280, height=330, columns={ {text='الاعبين', attr='name'} }, onitemdoubleclick=warpTo }, {'btn', id='انتقال', onclick=warpTo}, {'btn', id='اغلاق', closeswindow=true} }, oncreate = warpInit } function warpToCommand(cmd, player) if player then player = getPlayerFromNick(player) if player then server.warpMe(player) end else createWindow(wndWarp) showCursor(true) end end addCommandHandler('warpto', warpToCommand) addCommandHandler('wt', warpToCommand) وشكرا Link to comment
Mostafa MohammeD Posted November 27, 2015 Author Share Posted November 27, 2015 شباب عرفت كيف اغير مكان اللوحة بس ابي اعرف كيف اضيف بحث للانتقل وحل مشكلة كلمة nill Link to comment
Mostafa MohammeD Posted November 27, 2015 Author Share Posted November 27, 2015 شباب الحين سويت هيك بي الانتقال بالبحث بس ما يعمل ممكن تقولولي شو الخطئ function warpInit() local players = table.map(getElementsByType('player'), function(p) return { name = getPlayerName(p) } end) table.sort(players, function(a, b) return a.name < b.name end) bindGridListToTable(wndWarp, 'playerlist', players, true) end addEventHandler("onClientGUIChanged",root, function () if source == searching then searchgd(playerlist,guiGetText(source)) end end ) function warpTo(leaf) if not leaf then leaf = getSelectedGridListLeaf(wndWarp, 'playerlist') if not leaf then return end end local player = getPlayerFromNick(leaf.name) if player then server.warpMe(player) end closeWindow(wndWarp) end wndWarp = { 'wnd', text = 'انتقال الى لاعب', width = 300, controls = { {'txt', id='searching', text='البحث عن اللاعبين', width=284}, { 'lst', id='playerlist', width=280, height=310, columns={ {text='الاعبين', attr='name'} }, onitemdoubleclick=warpTo }, {'btn', id='انتقال', onclick=warpTo}, {'btn', id='اغلاق', closeswindow=true} }, oncreate = warpInit } function warpToCommand(cmd, player) if player then player = getPlayerFromNick(player) if player then server.warpMe(player) end else createWindow(wndWarp) showCursor(true) end end addCommandHandler('warpto', warpToCommand) addCommandHandler('wt', warpToCommand) Link to comment
Mostafa MohammeD Posted November 29, 2015 Author Share Posted November 29, 2015 شباب مساعده بليز طلب واحد بس ليش الحالات والملابس يبان لي الكلام فيهم باسم كلمة nill طلب واحد فقط Link to comment
Mostafa MohammeD Posted December 8, 2015 Author Share Posted December 8, 2015 http://cdn.top4top.co/i_d026a9cc8d1.png الدي بق يقلي هيك شو في هاي الاسطر gui.lua هاي السطر الي بي ملف function setControlNumber(...) local args = {...} local num = table.remove(args) guiSetText(getControl(unpack(args)), tostring(num)) end هاي السطر الي بي ملف fr_client.lua function updateGUI(updateVehicle) -- update position local x, y, z = getElementPosition(g_Me) setControlNumbers(wndMain, {xpos=math.ceil(x), ypos=math.ceil(y), zpos=math.ceil(z)}) -- update jetpack toggle guiCheckBoxSetSelected( getControl(wndMain, 'jetpack'), doesPedHaveJetPack(g_Me) ) if updateVehicle then -- update current vehicle local vehicle = getPedOccupiedVehicle(g_Me) if vehicle and isElement(vehicle) then setControlText(wndMain, 'curvehicle', getVehicleName(vehicle)) else setControlText(wndMain, 'curvehicle', 'On foot') end 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