Jump to content

مساعده بي الفري روم


Recommended Posts

ابي منكم يا شباب 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

شباب الحين سويت هيك بي الانتقال بالبحث

بس ما يعمل ممكن تقولولي شو الخطئ

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
  • 2 weeks later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...