Jump to content

كود الخريطة في الفري روم


Recommended Posts

السلامـ عليكمـ

أخواني بغيت الكود اللي في الفري روم حق الخريطة, يعني لمن اضغط على اي مكان بالخريطة يوديني له

ماعرفت اخرجه من الفري روم, وشكراً

Link to comment

آتوقع آنه هذآ :

        local x, y = getElementPosition(elem) 
        x = math.floor((x + 3000) * g_MapSide / 6000) - 4 
        y = math.floor((3000 - y) * g_MapSide / 6000) - 4 
        guiSetPosition(player.gui.mapBlip, x, y, false) 
        guiSetPosition(player.gui.mapLabelShadow, x + 14, y - 4, false) 
        guiSetPosition(player.gui.mapLabel, x + 13, y - 5, false) 

Link to comment
آتوقع آنه هذآ :
        local x, y = getElementPosition(elem) 
        x = math.floor((x + 3000) * g_MapSide / 6000) - 4 
        y = math.floor((3000 - y) * g_MapSide / 6000) - 4 
        guiSetPosition(player.gui.mapBlip, x, y, false) 
        guiSetPosition(player.gui.mapLabelShadow, x + 14, y - 4, false) 
        guiSetPosition(player.gui.mapLabel, x + 13, y - 5, false) 

really.jpg

Link to comment

اوك مشكوور

عندي سؤال ثاني

wndMain = { 
    'wnd', 
    text = 'FR GUI', 
    x = 10, 
    y = 150, 
    width = 280, 
    controls = { 
        {'lbl', text='Local player'}, 
        {'br'}, 
        {'btn', id='kill', onclick=killLocalPlayer}, 
        {'btn', id='skin', window=wndSkin}, 
        {'btn', id='anim', window=wndAnim}, 
        {'btn', id='weapon', window=wndWeapon}, 
        {'btn', id='clothes', window=wndClothes}, 
        {'btn', id='playergrav', text='grav', window=wndGravity}, 
        {'btn', id='warp', window=wndWarp}, 
        {'btn', id='stats', window=wndStats}, 
        {'btn', id='bookmarks', window=wndBookmarks}, 
        {'br'}, 
        {'chk', id='jetpack', onclick=toggleJetPack}, 
        {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, 
        {'br'}, 
         
        {'lbl', text='Pos:'}, 
        {'lbl', id='xpos', text='x', width=45}, 
        {'lbl', id='ypos', text='y', width=45}, 
        {'lbl', id='zpos', text='z', width=45}, 
        {'btn', id='setpos', text='map', window=wndSetPos}, 
        {'btn', id='setinterior', text='int', window=wndSetInterior}, 
        {'br'}, 
        {'br'}, 
         
        {'lbl', text='Vehicles'}, 
        {'br'}, 
        {'lbl', text='Current:'}, 
        {'lbl', id='curvehicle'}, 
        {'br'}, 
        {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, 
        {'btn', id='repair', onclick=repairVehicle}, 
        {'btn', id='flip', onclick=flipVehicle}, 
        {'btn', id='upgrades', window=wndUpgrades}, 
        {'btn', id='color', onclick=openColorPicker}, 
        {'btn', id='paintjob', window=wndPaintjob}, 
        {'br'}, 
        {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, 
        {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, 
        {'br'}, 
        {'br'}, 
         
        {'lbl', text='Environment'}, 
        {'br'}, 
        {'btn', id='time', window=wndTime}, 
        {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, 
        {'btn', id='weather', window=wndWeather}, 
        {'btn', id='speed', window=wndGameSpeed} 
    }, 
    oncreate = mainWndShow, 
    onclose = mainWndClose 
} 

انا متأكد ان هذا هو تصميم النافذة, انا ابغى اعرف كيف اعدل عليه؟ وين احط الاحداثيات؟ كيف طريقته يعني

Link to comment

يزن هذا يحدد موقع اللوحة

أنا كنت أبغى مكان الزر وحجمه وكذا بس خلاص حصلتها

+ مشكوور

+ آخر سؤال

أنا أبغى لمن الواحد تحميله ما خلص, تطلعله صورة من السيرفر

setCameraMatrix يعني بإستخدامـ

جربت كذا بس ما نفع

addEventHandler ( 'onClientPlayerJoin', root, 
    function ( ) 
        if isTransferBoxActive ( ) == true then 
            setCameraMatrix ( -2521.88671875, 339.87979125977, 35.094898223877, -2520.9926757813, 340.20202636719, 35.406051635742, 70, 0 )  
        else     
            setCameraTarget ( source ) 
        end 
    end 
) 

Link to comment

-- Server side --

addEventHandler ( 'onPlayerJoin', root, 
    function ( ) 
            setCameraMatrix (source,-2521.88671875, 339.87979125977, 35.094898223877, -2520.9926757813, 340.20202636719, 35.406051635742, 70, 0 ); 
    end 
); 

setCameraTarget

سوية كلنت سايد يوم يشتغل ريسورس روت وبس #

-- Client --

addEventHandler ( 'onClientResourceStart',resourceRoot, 
    function ( ) 
             setCameraTarget(localPlayer); 
    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...