Jump to content

تحريك ازرار اف 1


Mando

Recommended Posts

السلام عليكم ورحمه الله و بركاته

انا عندى فرى هوم انا ظبط فيه كل شئ بس ابى احرك الازرار بس ما اعرف وين القى الملف حقها

او ابى اضيف زر سور انا مبتدا شويه بس ياليت تساعدونى :D

Link to comment

ممكن مثال يعنى ده الfr client

اظبط فين

newFont = guiCreateFont ( "customfont.ttf", 20 ) 
 
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 )
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 )
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground )
    guiSetFont ( mainBackgroundLabel, newFont )
    guiSetEnabled ( mainBackgroundLabel, false )
    return mainBackground
end
 
CONTROL_MARGIN_RIGHT = 5
LINE_MARGIN = 5
LINE_HEIGHT = 16
 
g_Root = getRootElement()
g_ResRoot = getResourceRootElement(getThisResource())
g_Me = getLocalPlayer()
server = createServerCallInterface()
guiSetInputMode("no_binds_when_editing")
 
---------------------------
-- Set skin window
---------------------------
function skinInit()
    setControlNumber(wndSkin, 'skinid', getElementModel(g_Me))
end
 
function showSkinID(leaf)
    if leaf.id then
        setControlNumber(wndSkin, 'skinid', leaf.id)
    end
end
 
function applySkin()
    local skinID = getControlNumber(wndSkin, 'skinid')
    if skinID then
        server.setMySkin(skinID)
        fadeCamera(true)
    end
end
 
wndSkin = {
    'wnd',
    text = '~|شخصيات|~                          ',
    width = 143,
    x = 98,
    y = 120,
    controls = {
        {
            'lst',
            id='skinlist',
            width=230,
            height=290,
            columns={
                {text='~|شخصيات|~', attr='name'}
            },
            rows={xml='skins.xml', attrs={'id', 'name'}},
            onitemclick=showSkinID,
            onitemdoubleclick=applySkin
        },
        {'txt', id='skinid', text='', width=50},
        {'btn', id='تعيين', onclick=applySkin},
        {'btn', id='X', closeswindow=true}
    },
    oncreate = skinInit
}
 
function setSkinCommand(cmd, skin)
    skin = skin and tonumber(skin)
    if skin then
        server.setMySkin(skin)
        fadeCamera(true)
        closeWindow(wndSpawnMap)
        closeWindow(wndSetPos)
    end
end
addCommandHandler('setskin', setSkinCommand)
addCommandHandler('ss', setSkinCommand)
 
---------------------------
--- Set animation window
---------------------------
 
function applyAnimation(leaf)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndAnim, 'animlist')
        if not leaf then
            return
        end
    end
    server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true)
end
 
function stopAnimation()
    server.setPedAnimation(g_Me, false)
end
 
wndAnim = {
    'wnd',
    text = 'حركات                          ',
    width = 250,
    x = -20,
    y = 0.3,
    controls = {
        {
            'lst',
            id='animlist',
            width=230,
            height=290,
            columns={
                {text='حركات', attr='name'}
            },
            rows={xml='animations.xml', attrs={'name'}},
            expandlastlevel=false,
            onitemdoubleclick=applyAnimation
        },
        {'btn', id='تشغيل', onclick=applyAnimation},
        {'btn', id='ايقاف', onclick=stopAnimation},
        {'btn', id='X', closeswindow=true}
    }
}
 
addCommandHandler('anim',
    function(command, lib, name)
        server.setPedAnimation(g_Me, lib, name, true, true)
    end
)
 
---------------------------
-- Weapon window
---------------------------
 
function addWeapon(leaf, amount)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist')
        amount = getControlNumber(wndWeapon, 'amount')
        if not amount or not leaf then
            return
        end
    end
    server.giveMeWeapon(leaf.id, amount)
end
 
wndWeapon = {
    'wnd',
    text = 'أدوات                          ',
    width = 250,
    controls = {
        {
            'lst',
            id='weaplist',
            width=230,
            height=280,
            columns={
                {text='أدوات', attr='name'}
            },
            rows={xml='weapons.xml', attrs={'id', 'name'}},
            onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end
        },
        {'br'},
        {'txt', id='amount', text='500', width=60},
        {'btn', id='اضافة', onclick=addWeapon},
        {'btn', id='X', closeswindow=true}
    }
}
 
function giveWeaponCommand(cmd, weapon, amount)
    weapon = tonumber(weapon) or getWeaponIDFromName(weapon)
    if not weapon then
        return
    end
    amount = amount and tonumber(amount) or 500
    server.giveMeWeapon(math.floor(weapon), amount)
end
--addCommandHandler('give', giveWeaponCommand)
--addCommandHandler('wp', giveWeaponCommand)
 
---------------------------
-- Fighting style
---------------------------
 
addCommandHandler('setstyle',
    function(cmd, style)
        style = style and tonumber(style)
        if style then
            server.setPedFightingStyle(g_Me, style)
        end
    end
)
 
---------------------------
-- Clothes window
---------------------------
function clothesInit()
    if getElementModel(g_Me) ~= 0 then
        errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة')
        closeWindow(wndClothes)
        return
    end
    if not g_Clothes then
        triggerServerEvent('onClothesInit', g_Me)
    end
end
 
addEvent('onClientClothesInit', true)
addEventHandler('onClientClothesInit', g_Root,
    function(clothes)
        g_Clothes = clothes.allClothes
        for i,typeGroup in ipairs(g_Clothes) do
            for j,cloth in ipairs(typeGroup.children) do
                if not cloth.name then
                    cloth.name = cloth.model .. ' - ' .. cloth.texture
                end
                cloth.wearing =
                    clothes.playerClothes[typeGroup.type] and
                    clothes.playerClothes[typeGroup.type].texture == cloth.texture and
                    clothes.playerClothes[typeGroup.type].model == cloth.model
                    or false
            end
            table.sort(typeGroup.children, function(a, b) return a.name < b.name end)
        end
        bindGridListToTable(wndClothes, 'clothes', g_Clothes, false)
    end
)
 
function clothListClick(cloth)
    setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add')
end
 
function applyClothes(cloth)
    if not cloth then
        cloth = getSelectedGridListLeaf(wndClothes, 'clothes')
        if not cloth then
            return
        end
    end
    if cloth.wearing then
        cloth.wearing = false
        setControlText(wndClothes, 'addremove', 'add')
        server.removePlayerClothes(g_Me, cloth.parent.type)
    else
        local prevClothIndex = table.find(cloth.siblings, 'wearing', true)
        if prevClothIndex then
            cloth.siblings[prevClothIndex].wearing = false
        end
        cloth.wearing = true
        setControlText(wndClothes, 'addremove', 'remove')
        server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type)
    end
end
 
wndClothes = {
Link to comment
ممكن مثال يعنى ده الfr client

اظبط فين

newFont = guiCreateFont ( "customfont.ttf", 20 ) 
 
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 )
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 )
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground )
    guiSetFont ( mainBackgroundLabel, newFont )
    guiSetEnabled ( mainBackgroundLabel, false )
    return mainBackground
end
 
CONTROL_MARGIN_RIGHT = 5
LINE_MARGIN = 5
LINE_HEIGHT = 16
 
g_Root = getRootElement()
g_ResRoot = getResourceRootElement(getThisResource())
g_Me = getLocalPlayer()
server = createServerCallInterface()
guiSetInputMode("no_binds_when_editing")
 
---------------------------
-- Set skin window
---------------------------
function skinInit()
    setControlNumber(wndSkin, 'skinid', getElementModel(g_Me))
end
 
function showSkinID(leaf)
    if leaf.id then
        setControlNumber(wndSkin, 'skinid', leaf.id)
    end
end
 
function applySkin()
    local skinID = getControlNumber(wndSkin, 'skinid')
    if skinID then
        server.setMySkin(skinID)
        fadeCamera(true)
    end
end
 
wndSkin = {
    'wnd',
    text = '~|شخصيات|~                          ',
    width = 143,
    x = 98,
    y = 120,
    controls = {
        {
            'lst',
            id='skinlist',
            width=230,
            height=290,
            columns={
                {text='~|شخصيات|~', attr='name'}
            },
            rows={xml='skins.xml', attrs={'id', 'name'}},
            onitemclick=showSkinID,
            onitemdoubleclick=applySkin
        },
        {'txt', id='skinid', text='', width=50},
        {'btn', id='تعيين', onclick=applySkin},
        {'btn', id='X', closeswindow=true}
    },
    oncreate = skinInit
}
 
function setSkinCommand(cmd, skin)
    skin = skin and tonumber(skin)
    if skin then
        server.setMySkin(skin)
        fadeCamera(true)
        closeWindow(wndSpawnMap)
        closeWindow(wndSetPos)
    end
end
addCommandHandler('setskin', setSkinCommand)
addCommandHandler('ss', setSkinCommand)
 
---------------------------
--- Set animation window
---------------------------
 
function applyAnimation(leaf)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndAnim, 'animlist')
        if not leaf then
            return
        end
    end
    server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true)
end
 
function stopAnimation()
    server.setPedAnimation(g_Me, false)
end
 
wndAnim = {
    'wnd',
    text = 'حركات                          ',
    width = 250,
    x = -20,
    y = 0.3,
    controls = {
        {
            'lst',
            id='animlist',
            width=230,
            height=290,
            columns={
                {text='حركات', attr='name'}
            },
            rows={xml='animations.xml', attrs={'name'}},
            expandlastlevel=false,
            onitemdoubleclick=applyAnimation
        },
        {'btn', id='تشغيل', onclick=applyAnimation},
        {'btn', id='ايقاف', onclick=stopAnimation},
        {'btn', id='X', closeswindow=true}
    }
}
 
addCommandHandler('anim',
    function(command, lib, name)
        server.setPedAnimation(g_Me, lib, name, true, true)
    end
)
 
---------------------------
-- Weapon window
---------------------------
 
function addWeapon(leaf, amount)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist')
        amount = getControlNumber(wndWeapon, 'amount')
        if not amount or not leaf then
            return
        end
    end
    server.giveMeWeapon(leaf.id, amount)
end
 
wndWeapon = {
    'wnd',
    text = 'أدوات                          ',
    width = 250,
    controls = {
        {
            'lst',
            id='weaplist',
            width=230,
            height=280,
            columns={
                {text='أدوات', attr='name'}
            },
            rows={xml='weapons.xml', attrs={'id', 'name'}},
            onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end
        },
        {'br'},
        {'txt', id='amount', text='500', width=60},
        {'btn', id='اضافة', onclick=addWeapon},
        {'btn', id='X', closeswindow=true}
    }
}
 
function giveWeaponCommand(cmd, weapon, amount)
    weapon = tonumber(weapon) or getWeaponIDFromName(weapon)
    if not weapon then
        return
    end
    amount = amount and tonumber(amount) or 500
    server.giveMeWeapon(math.floor(weapon), amount)
end
--addCommandHandler('give', giveWeaponCommand)
--addCommandHandler('wp', giveWeaponCommand)
 
---------------------------
-- Fighting style
---------------------------
 
addCommandHandler('setstyle',
    function(cmd, style)
        style = style and tonumber(style)
        if style then
            server.setPedFightingStyle(g_Me, style)
        end
    end
)
 
---------------------------
-- Clothes window
---------------------------
function clothesInit()
    if getElementModel(g_Me) ~= 0 then
        errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة')
        closeWindow(wndClothes)
        return
    end
    if not g_Clothes then
        triggerServerEvent('onClothesInit', g_Me)
    end
end
 
addEvent('onClientClothesInit', true)
addEventHandler('onClientClothesInit', g_Root,
    function(clothes)
        g_Clothes = clothes.allClothes
        for i,typeGroup in ipairs(g_Clothes) do
            for j,cloth in ipairs(typeGroup.children) do
                if not cloth.name then
                    cloth.name = cloth.model .. ' - ' .. cloth.texture
                end
                cloth.wearing =
                    clothes.playerClothes[typeGroup.type] and
                    clothes.playerClothes[typeGroup.type].texture == cloth.texture and
                    clothes.playerClothes[typeGroup.type].model == cloth.model
                    or false
            end
            table.sort(typeGroup.children, function(a, b) return a.name < b.name end)
        end
        bindGridListToTable(wndClothes, 'clothes', g_Clothes, false)
    end
)
 
function clothListClick(cloth)
    setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add')
end
 
function applyClothes(cloth)
    if not cloth then
        cloth = getSelectedGridListLeaf(wndClothes, 'clothes')
        if not cloth then
            return
        end
    end
    if cloth.wearing then
        cloth.wearing = false
        setControlText(wndClothes, 'addremove', 'add')
        server.removePlayerClothes(g_Me, cloth.parent.type)
    else
        local prevClothIndex = table.find(cloth.siblings, 'wearing', true)
        if prevClothIndex then
            cloth.siblings[prevClothIndex].wearing = false
        end
        cloth.wearing = true
        setControlText(wndClothes, 'addremove', 'remove')
        server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type)
    end
end
Link to comment
ممكن مثال يعنى ده الfr client

اظبط فين

newFont = guiCreateFont ( "customfont.ttf", 20 ) 
 
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 )
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 )
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground )
    guiSetFont ( mainBackgroundLabel, newFont )
    guiSetEnabled ( mainBackgroundLabel, false )
    return mainBackground
end
 
CONTROL_MARGIN_RIGHT = 5
LINE_MARGIN = 5
LINE_HEIGHT = 16
 
g_Root = getRootElement()
g_ResRoot = getResourceRootElement(getThisResource())
g_Me = getLocalPlayer()
server = createServerCallInterface()
guiSetInputMode("no_binds_when_editing")
 
---------------------------
-- Set skin window
---------------------------
function skinInit()
    setControlNumber(wndSkin, 'skinid', getElementModel(g_Me))
end
 
function showSkinID(leaf)
    if leaf.id then
        setControlNumber(wndSkin, 'skinid', leaf.id)
    end
end
 
function applySkin()
    local skinID = getControlNumber(wndSkin, 'skinid')
    if skinID then
        server.setMySkin(skinID)
        fadeCamera(true)
    end
end
 
wndSkin = {
    'wnd',
    text = '~|شخصيات|~                          ',
    width = 143,
    x = 98,
    y = 120,
    controls = {
        {
            'lst',
            id='skinlist',
            width=230,
            height=290,
            columns={
                {text='~|شخصيات|~', attr='name'}
            },
            rows={xml='skins.xml', attrs={'id', 'name'}},
            onitemclick=showSkinID,
            onitemdoubleclick=applySkin
        },
        {'txt', id='skinid', text='', width=50},
        {'btn', id='تعيين', onclick=applySkin},
        {'btn', id='X', closeswindow=true}
    },
    oncreate = skinInit
}
 
function setSkinCommand(cmd, skin)
    skin = skin and tonumber(skin)
    if skin then
        server.setMySkin(skin)
        fadeCamera(true)
        closeWindow(wndSpawnMap)
        closeWindow(wndSetPos)
    end
end
addCommandHandler('setskin', setSkinCommand)
addCommandHandler('ss', setSkinCommand)
 
---------------------------
--- Set animation window
---------------------------
 
function applyAnimation(leaf)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndAnim, 'animlist')
        if not leaf then
            return
        end
    end
    server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true)
end
 
function stopAnimation()
    server.setPedAnimation(g_Me, false)
end
 
wndAnim = {
    'wnd',
    text = 'حركات                          ',
    width = 250,
    x = -20,
    y = 0.3,
    controls = {
        {
            'lst',
            id='animlist',
            width=230,
            height=290,
            columns={
                {text='حركات', attr='name'}
            },
            rows={xml='animations.xml', attrs={'name'}},
            expandlastlevel=false,
            onitemdoubleclick=applyAnimation
        },
        {'btn', id='تشغيل', onclick=applyAnimation},
        {'btn', id='ايقاف', onclick=stopAnimation},
        {'btn', id='X', closeswindow=true}
    }
}
 
addCommandHandler('anim',
    function(command, lib, name)
        server.setPedAnimation(g_Me, lib, name, true, true)
    end
)
 
---------------------------
-- Weapon window
---------------------------
 
function addWeapon(leaf, amount)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist')
        amount = getControlNumber(wndWeapon, 'amount')
        if not amount or not leaf then
            return
        end
    end
    server.giveMeWeapon(leaf.id, amount)
end
 
wndWeapon = {
    'wnd',
    text = 'أدوات                          ',
    width = 250,
    controls = {
        {
            'lst',
            id='weaplist',
            width=230,
            height=280,
            columns={
                {text='أدوات', attr='name'}
            },
            rows={xml='weapons.xml', attrs={'id', 'name'}},
            onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end
        },
        {'br'},
        {'txt', id='amount', text='500', width=60},
        {'btn', id='اضافة', onclick=addWeapon},
        {'btn', id='X', closeswindow=true}
    }
}
 
function giveWeaponCommand(cmd, weapon, amount)
    weapon = tonumber(weapon) or getWeaponIDFromName(weapon)
    if not weapon then
        return
    end
    amount = amount and tonumber(amount) or 500
    server.giveMeWeapon(math.floor(weapon), amount)
end
--addCommandHandler('give', giveWeaponCommand)
--addCommandHandler('wp', giveWeaponCommand)
 
---------------------------
-- Fighting style
---------------------------
 
addCommandHandler('setstyle',
    function(cmd, style)
        style = style and tonumber(style)
        if style then
            server.setPedFightingStyle(g_Me, style)
        end
    end
)
 
---------------------------
-- Clothes window
---------------------------
function clothesInit()
    if getElementModel(g_Me) ~= 0 then
        errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة')
        closeWindow(wndClothes)
        return
    end
    if not g_Clothes then
        triggerServerEvent('onClothesInit', g_Me)
    end
end
 
addEvent('onClientClothesInit', true)
addEventHandler('onClientClothesInit', g_Root,
    function(clothes)
        g_Clothes = clothes.allClothes
        for i,typeGroup in ipairs(g_Clothes) do
            for j,cloth in ipairs(typeGroup.children) do
                if not cloth.name then
                    cloth.name = cloth.model .. ' - ' .. cloth.texture
                end
                cloth.wearing =
                    clothes.playerClothes[typeGroup.type] and
                    clothes.playerClothes[typeGroup.type].texture == cloth.texture and
                    clothes.playerClothes[typeGroup.type].model == cloth.model
                    or false
            end
            table.sort(typeGroup.children, function(a, b) return a.name < b.name end)
        end
        bindGridListToTable(wndClothes, 'clothes', g_Clothes, false)
    end
)
 
function clothListClick(cloth)
    setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add')
end
 
function applyClothes(cloth)
    if not cloth then
        cloth = getSelectedGridListLeaf(wndClothes, 'clothes')
        if not cloth then
            return
        end
    end
    if cloth.wearing then
        cloth.wearing = false
        setControlText(wndClothes, 'addremove', 'add')
        server.removePlayerClothes(g_Me, cloth.parent.type)
    else
        local prevClothIndex = table.find(cloth.siblings, 'wearing', true)
        if prevClothIndex then
            cloth.siblings[prevClothIndex].wearing = false
        end
        cloth.wearing = true
        setControlText(wndClothes, 'addremove', 'remove')
        server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type)
Link to comment
ممكن مثال يعنى ده الfr client

اظبط فين

newFont = guiCreateFont ( "customfont.ttf", 20 ) 
 
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 )
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 )
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground )
    guiSetFont ( mainBackgroundLabel, newFont )
    guiSetEnabled ( mainBackgroundLabel, false )
    return mainBackground
end
 
CONTROL_MARGIN_RIGHT = 5
LINE_MARGIN = 5
LINE_HEIGHT = 16
 
g_Root = getRootElement()
g_ResRoot = getResourceRootElement(getThisResource())
g_Me = getLocalPlayer()
server = createServerCallInterface()
guiSetInputMode("no_binds_when_editing")
 
---------------------------
-- Set skin window
---------------------------
function skinInit()
    setControlNumber(wndSkin, 'skinid', getElementModel(g_Me))
end
 
function showSkinID(leaf)
    if leaf.id then
        setControlNumber(wndSkin, 'skinid', leaf.id)
    end
end
 
function applySkin()
    local skinID = getControlNumber(wndSkin, 'skinid')
    if skinID then
        server.setMySkin(skinID)
        fadeCamera(true)
    end
end
 
wndSkin = {
    'wnd',
    text = '~|شخصيات|~                          ',
    width = 143,
    x = 98,
    y = 120,
    controls = {
        {
            'lst',
            id='skinlist',
            width=230,
            height=290,
            columns={
                {text='~|شخصيات|~', attr='name'}
            },
            rows={xml='skins.xml', attrs={'id', 'name'}},
            onitemclick=showSkinID,
            onitemdoubleclick=applySkin
        },
        {'txt', id='skinid', text='', width=50},
        {'btn', id='تعيين', onclick=applySkin},
        {'btn', id='X', closeswindow=true}
    },
    oncreate = skinInit
}
 
function setSkinCommand(cmd, skin)
    skin = skin and tonumber(skin)
    if skin then
        server.setMySkin(skin)
        fadeCamera(true)
        closeWindow(wndSpawnMap)
        closeWindow(wndSetPos)
    end
end
addCommandHandler('setskin', setSkinCommand)
addCommandHandler('ss', setSkinCommand)
 
---------------------------
--- Set animation window
---------------------------
 
function applyAnimation(leaf)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndAnim, 'animlist')
        if not leaf then
            return
        end
    end
    server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true)
end
 
function stopAnimation()
    server.setPedAnimation(g_Me, false)
end
 
wndAnim = {
    'wnd',
    text = 'حركات                          ',
    width = 250,
    x = -20,
    y = 0.3,
    controls = {
        {
            'lst',
            id='animlist',
            width=230,
            height=290,
            columns={
                {text='حركات', attr='name'}
            },
            rows={xml='animations.xml', attrs={'name'}},
            expandlastlevel=false,
            onitemdoubleclick=applyAnimation
        },
        {'btn', id='تشغيل', onclick=applyAnimation},
        {'btn', id='ايقاف', onclick=stopAnimation},
        {'btn', id='X', closeswindow=true}
    }
}
 
addCommandHandler('anim',
    function(command, lib, name)
        server.setPedAnimation(g_Me, lib, name, true, true)
    end
)
 
---------------------------
-- Weapon window
---------------------------
 
function addWeapon(leaf, amount)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist')
        amount = getControlNumber(wndWeapon, 'amount')
        if not amount or not leaf then
            return
        end
    end
    server.giveMeWeapon(leaf.id, amount)
end
 
wndWeapon = {
    'wnd',
    text = 'أدوات                          ',
    width = 250,
    controls = {
        {
            'lst',
            id='weaplist',
            width=230,
            height=280,
            columns={
                {text='أدوات', attr='name'}
            },
            rows={xml='weapons.xml', attrs={'id', 'name'}},
            onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end
        },
        {'br'},
        {'txt', id='amount', text='500', width=60},
        {'btn', id='اضافة', onclick=addWeapon},
        {'btn', id='X', closeswindow=true}
    }
}
 
function giveWeaponCommand(cmd, weapon, amount)
    weapon = tonumber(weapon) or getWeaponIDFromName(weapon)
    if not weapon then
        return
    end
    amount = amount and tonumber(amount) or 500
    server.giveMeWeapon(math.floor(weapon), amount)
end
--addCommandHandler('give', giveWeaponCommand)
--addCommandHandler('wp', giveWeaponCommand)
 
---------------------------
-- Fighting style
---------------------------
 
addCommandHandler('setstyle',
    function(cmd, style)
        style = style and tonumber(style)
        if style then
            server.setPedFightingStyle(g_Me, style)
        end
    end
)
 
---------------------------
-- Clothes window
---------------------------
function clothesInit()
    if getElementModel(g_Me) ~= 0 then
        errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة')
        closeWindow(wndClothes)
        return
    end
    if not g_Clothes then
        triggerServerEvent('onClothesInit', g_Me)
    end
end
 
addEvent('onClientClothesInit', true)
addEventHandler('onClientClothesInit', g_Root,
    function(clothes)
        g_Clothes = clothes.allClothes
        for i,typeGroup in ipairs(g_Clothes) do
            for j,cloth in ipairs(typeGroup.children) do
                if not cloth.name then
                    cloth.name = cloth.model .. ' - ' .. cloth.texture
                end
                cloth.wearing =
                    clothes.playerClothes[typeGroup.type] and
                    clothes.playerClothes[typeGroup.type].texture == cloth.texture and
                    clothes.playerClothes[typeGroup.type].model == cloth.model
                    or false
            end
            table.sort(typeGroup.children, function(a, b) return a.name < b.name end)
        end
        bindGridListToTable(wndClothes, 'clothes', g_Clothes, false)
    end
)
 
function clothListClick(cloth)
    setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add')
end
 
function applyClothes(cloth)
    if not cloth then
        cloth = getSelectedGridListLeaf(wndClothes, 'clothes')
        if not cloth then
            return
        end
    end
    if cloth.wearing then
        cloth.wearing = false
        setControlText(wndClothes, 'addremove', 'add')
        server.removePlayerClothes(g_Me, cloth.parent.type)
    else
        local prevClothIndex = table.find(cloth.siblings, 'wearing', true)
        if prevClothIndex then
            cloth.siblings[prevClothIndex].wearing = false
        end
        cloth.wearing = true
        setControlText(wndClothes, 'addremove', 'remove')
        server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type)
Link to comment
ممكن مثال يعنى ده الfr client

اظبط فين

newFont = guiCreateFont ( "customfont.ttf", 20 ) 
 
function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 )
    local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "OSAMA.png", relative2 )
    local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground )
    guiSetFont ( mainBackgroundLabel, newFont )
    guiSetEnabled ( mainBackgroundLabel, false )
    return mainBackground
end
 
CONTROL_MARGIN_RIGHT = 5
LINE_MARGIN = 5
LINE_HEIGHT = 16
 
g_Root = getRootElement()
g_ResRoot = getResourceRootElement(getThisResource())
g_Me = getLocalPlayer()
server = createServerCallInterface()
guiSetInputMode("no_binds_when_editing")
 
---------------------------
-- Set skin window
---------------------------
function skinInit()
    setControlNumber(wndSkin, 'skinid', getElementModel(g_Me))
end
 
function showSkinID(leaf)
    if leaf.id then
        setControlNumber(wndSkin, 'skinid', leaf.id)
    end
end
 
function applySkin()
    local skinID = getControlNumber(wndSkin, 'skinid')
    if skinID then
        server.setMySkin(skinID)
        fadeCamera(true)
    end
end
 
wndSkin = {
    'wnd',
    text = '~|شخصيات|~                          ',
    width = 143,
    x = 98,
    y = 120,
    controls = {
        {
            'lst',
            id='skinlist',
            width=230,
            height=290,
            columns={
                {text='~|شخصيات|~', attr='name'}
            },
            rows={xml='skins.xml', attrs={'id', 'name'}},
            onitemclick=showSkinID,
            onitemdoubleclick=applySkin
        },
        {'txt', id='skinid', text='', width=50},
        {'btn', id='تعيين', onclick=applySkin},
        {'btn', id='X', closeswindow=true}
    },
    oncreate = skinInit
}
 
function setSkinCommand(cmd, skin)
    skin = skin and tonumber(skin)
    if skin then
        server.setMySkin(skin)
        fadeCamera(true)
        closeWindow(wndSpawnMap)
        closeWindow(wndSetPos)
    end
end
addCommandHandler('setskin', setSkinCommand)
addCommandHandler('ss', setSkinCommand)
 
---------------------------
--- Set animation window
---------------------------
 
function applyAnimation(leaf)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndAnim, 'animlist')
        if not leaf then
            return
        end
    end
    server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true)
end
 
function stopAnimation()
    server.setPedAnimation(g_Me, false)
end
 
wndAnim = {
    'wnd',
    text = 'حركات                          ',
    width = 250,
    x = -20,
    y = 0.3,
    controls = {
        {
            'lst',
            id='animlist',
            width=230,
            height=290,
            columns={
                {text='حركات', attr='name'}
            },
            rows={xml='animations.xml', attrs={'name'}},
            expandlastlevel=false,
            onitemdoubleclick=applyAnimation
        },
        {'btn', id='تشغيل', onclick=applyAnimation},
        {'btn', id='ايقاف', onclick=stopAnimation},
        {'btn', id='X', closeswindow=true}
    }
}
 
addCommandHandler('anim',
    function(command, lib, name)
        server.setPedAnimation(g_Me, lib, name, true, true)
    end
)
 
---------------------------
-- Weapon window
---------------------------
 
function addWeapon(leaf, amount)
    if type(leaf) ~= 'table' then
        leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist')
        amount = getControlNumber(wndWeapon, 'amount')
        if not amount or not leaf then
            return
        end
    end
    server.giveMeWeapon(leaf.id, amount)
end
 
wndWeapon = {
    'wnd',
    text = 'أدوات                          ',
    width = 250,
    controls = {
        {
            'lst',
            id='weaplist',
            width=230,
            height=280,
            columns={
                {text='أدوات', attr='name'}
            },
            rows={xml='weapons.xml', attrs={'id', 'name'}},
            onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end
        },
        {'br'},
        {'txt', id='amount', text='500', width=60},
        {'btn', id='اضافة', onclick=addWeapon},
        {'btn', id='X', closeswindow=true}
    }
}
 
function giveWeaponCommand(cmd, weapon, amount)
    weapon = tonumber(weapon) or getWeaponIDFromName(weapon)
    if not weapon then
        return
    end
    amount = amount and tonumber(amount) or 500
    server.giveMeWeapon(math.floor(weapon), amount)
end
--addCommandHandler('give', giveWeaponCommand)
--addCommandHandler('wp', giveWeaponCommand)
 
---------------------------
-- Fighting style
---------------------------
 
addCommandHandler('setstyle',
    function(cmd, style)
        style = style and tonumber(style)
        if style then
            server.setPedFightingStyle(g_Me, style)
        end
    end
)
 
---------------------------
-- Clothes window
---------------------------
function clothesInit()
    if getElementModel(g_Me) ~= 0 then
        errMsg('يجب ان تستخدم شخصية سي جي لكي تدخل القائمة')
        closeWindow(wndClothes)
        return
    end
    if not g_Clothes then
        triggerServerEvent('onClothesInit', g_Me)
    end
end
 
addEvent('onClientClothesInit', true)
addEventHandler('onClientClothesInit', g_Root,
    function(clothes)
        g_Clothes = clothes.allClothes
        for i,typeGroup in ipairs(g_Clothes) do
            for j,cloth in ipairs(typeGroup.children) do
                if not cloth.name then
                    cloth.name = cloth.model .. ' - ' .. cloth.texture
                end
                cloth.wearing =
                    clothes.playerClothes[typeGroup.type] and
                    clothes.playerClothes[typeGroup.type].texture == cloth.texture and
                    clothes.playerClothes[typeGroup.type].model == cloth.model
                    or false
            end
            table.sort(typeGroup.children, function(a, b) return a.name < b.name end)
        end
        bindGridListToTable(wndClothes, 'clothes', g_Clothes, false)
    end
)
 
function clothListClick(cloth)
    setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add')
end
 
function applyClothes(cloth)
    if not cloth then
        cloth = getSelectedGridListLeaf(wndClothes, 'clothes')
        if not cloth then
            return
        end
    end
    if cloth.wearing then
        cloth.wearing = false
        setControlText(wndClothes, 'addremove', 'add')
        server.removePlayerClothes(g_Me, cloth.parent.type)
    else
        local prevClothIndex = table.find(cloth.siblings, 'wearing', true)
        if prevClothIndex then
            cloth.siblings[prevClothIndex].wearing = false
        end
        cloth.wearing = true
Link to comment

حبى انا انزل الباك ابات هادى و اسحب اكواد منها و فكشنات و كده بس انا جايب اى فرى روم عندى و بعدين اكتب

فرى روم سيرفر ابداع شف الفرى روم !!

Link to comment
مو بس آلفري روم مزروف ..

وآحد طفل بآليوتيوب آسمه

HamoodxGamer

منزل بآك آب كآمل لـ سيرفر آبدآع وسيرفرآت ثآنية !

اول شي انت غالط باسم قناتي

اسم قناتي كذا

hamod gamer

والطفل هاذا يسكتك ويسكت 10 زيك :wink:

ثاني شي

السيرفر مقفل

+ في ناس غيري نشرت المودات

وانا ماحط مودات سيرفر مفتوح

شوف كل الباك ابات حق سيرفرات مقفله

8)

تحياتي

Link to comment
مو بس آلفري روم مزروف ..

وآحد طفل بآليوتيوب آسمه

HamoodxGamer

منزل بآك آب كآمل لـ سيرفر آبدآع وسيرفرآت ثآنية !

اول شي انت غالط باسم قناتي

اسم قناتي كذا

hamod gamer

والطفل هاذا يسكتك ويسكت 10 زيك :wink:

ثاني شي

السيرفر مقفل

+ في ناس غيري نشرت المودات

وانا ماحط مودات سيرفر مفتوح

شوف كل الباك ابات حق سيرفرات مقفله

8)

تحياتي

حتى لو مقفله مالك اي حق تنشرها

Link to comment

المعذرة اخواني

Subject: تحريك ازرار اف 1

انا مش البرنس ولا boy والله العظيم

البرنس اسمو مصطفى و انا اسمى كريم

البرنس اخوانى

و انا مع الجيش

البرنس سكايبى بتاعه غير بتاعى

انا كريم ماندو

البرنس مش فاتح سيرفر

انا فاتح سيرفر m.g

و معروف

لا تتهمنى و انت لا تعرفى اكشف عن الايبهات و انت تعرف

وشكرا

عايز تبندنى بندى بس قسم بالله على القران انى مش البرنس

و انا اصلا ما اعرف حد اسمو البرنس

اكشف عن الايبهات و ادخل السيرفر بتاعى و شوف

على سوء الفهم والتسرع في اتخاذ القرارات Mando هذي الرسالة وصلتني اليوم, واعتذر للاخ

يُفتح

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...