Jump to content

مساعده في الانتقالات


Recommended Posts

السلام عليكم

شباب انا سويت لوحة انتقالات قريد ليست

طبعا ماعرفله كثير ولاكن

فيه خطا

واتمني تساعدوني

كلنت #

  
warptaple = { 
    { "البداية " }, 
    { "الشارع الطويل" }, 
    { "المقر" }, 
} 
        
for i, v in ipairs ( warptaple ) do 
    local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
    guiGridListSetItemText ( GUIEditor.gridlist[1], 1, row, v[1], false ) 
end 
  
addEventHandler("onClientGUIClick",root, 
    function() 
                if (source == GUIEditor.button[1]) then 
                        local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) 
                        local get =  guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) 
                        if ( row and col and row ~= -1 and col ~= -1 ) then 
                     if ( source == "البداية " ) then 
                            triggerServerEvent("a", localPlayer) 
                        end 
                end 
        end 
end 
) 
  
  
addEventHandler("onClientGUIClick",root, 
    function() 
                if (source == GUIEditor.button[1]) then 
                        local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) 
                        local get =  guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) 
                        if ( row and col and row ~= -1 and col ~= -1 ) then 
                     if ( source == "الشارع الطويل" ) then 
                            triggerServerEvent("b", localPlayer) 
                        end 
                end 
        end 
end 
) 
  
  
  
addEventHandler("onClientGUIClick",root, 
    function() 
                if (source == GUIEditor.button[1]) then 
                        local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) 
                        local get =  guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) 
                        if ( row and col and row ~= -1 and col ~= -1 ) then 
                     if ( source == "المقر" ) then 
                            triggerServerEvent("c", localPlayer) 
                        end 
                end 
        end 
end 
) 

سيرفر

addEvent("a",true) 
addEventHandler("a",root, 
function() 
spawnPlayer ( source,-1518.7962646484,-2355.3571777344,14.712463378906)  
 end 
) 
  
  
addEvent("b",true) 
addEventHandler("b",root, 
function() 
spawnPlayer ( source,-3798.7612304688,-3002.7980957031,50.607810974121)  
 end 
) 
  
  
addEvent("c",true) 
addEventHandler("c",root, 
function() 
spawnPlayer ( source,1529.0759277344,2830.3481445313,17.315364837646)  
 end 
) 

الوحه تفتح بس البدايه و المقر وهذول مايطلعون ليه

يقول الخطا في سطر

9

و

8 في الكلنت

Edited by Guest
Link to comment

الاخطاء هي:

سطر 9

guiGridListSetItemText ( element gridList, int rowIndex, int columnIndex, string text, bool section, bool number ) 

guiGridListSetItemText ( GUIEditor.gridlist[1], 1, row, v[1], false, true ) 

عن آخر ارقيومنت true انت مسويها ارقام فقط .. شيل

في السيرفر مو الكلنت get ثانياً وظيفة

Link to comment

Client :

warptaple = { 
    { "البداية " }, 
    { "الشارع الطويل" }, 
    { "المقر" }, 
} 
  
for i,v in ipairs( warptaple ) do 
    local row = guiGridListAddRow( GUIEditor.gridlist[1] ) 
    guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) 
end 
  
addEventHandler( "onClientGUIClick", root, 
    function( ) 
        if source == GUIEditor.button[1] then 
            local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
            if row and col and row ~= -1 and col ~= -1 then 
                local get =  guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) 
                if get == "البداية " then 
                    triggerServerEvent( "a", localPlayer ) 
                elseif get == "الشارع الطويل" then 
                    triggerServerEvent( "b", localPlayer ) 
                elseif get == "المقر" then 
                    triggerServerEvent( "c", localPlayer ) 
                end 
            end 
        end 
    end 
) 

Server :

addEvent( "a", true ) 
addEventHandler( "a", root, 
    function( ) 
        spawnPlayer( source, -1518.7962646484, -2355.3571777344, 14.712463378906 ) 
    end 
) 
  
  
addEvent( "b", true ) 
addEventHandler( "b", root, 
    function( ) 
        spawnPlayer( source, -3798.7612304688, -3002.7980957031, 50.607810974121 ) 
    end 
) 
  
  
addEvent( "c", true ) 
addEventHandler( "c", root, 
    function( ) 
        spawnPlayer( source, 1529.0759277344, 2830.3481445313, 17.315364837646 ) 
    end 
) 

Link to comment

لا مو خايف عليه خخ اصلن مود عادي

GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(503, 170, 365, 400, "انتقالات", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible ( GUIEditor.window[1], false ) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
  
        GUIEditor.gridlist[1] = guiCreateGridList(9, 22, 347, 306, false, GUIEditor.window[1]) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Warp", 0.9) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "-", false, false) 
        GUIEditor.button[1] = guiCreateButton(64, 337, 236, 30, "Go ", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(78, 372, 205, 19, "close", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
warptaple = { 
    { "البداية " }, 
    { "الشارع الطويل" }, 
    { "المقر" }, 
} 
  
for i,v in ipairs( warptaple ) do 
    local row = guiGridListAddRow( GUIEditor.gridlist[1] ) 
    guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) 
end 
  
addEventHandler( "onClientGUIClick", root, 
    function( ) 
        if source == GUIEditor.button[1] then 
            local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
            if row and col and row ~= -1 and col ~= -1 then 
                local get =  guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) 
                if get == "البداية " then 
                    triggerServerEvent( "a", localPlayer ) 
                elseif get == "الشارع الطويل" then 
                    triggerServerEvent( "b", localPlayer ) 
                elseif get == "المقر" then 
                    triggerServerEvent( "c", localPlayer ) 
                end 
            end 
        end 
    end 
) 
  

Link to comment

جرب :

GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
warptaple = { 
    { "البداية " }, 
    { "الشارع الطويل" }, 
    { "المقر" }, 
} 
  
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(503, 170, 365, 400, "انتقالات", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible ( GUIEditor.window[1], false ) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
  
        GUIEditor.gridlist[1] = guiCreateGridList( 9, 22, 347, 306, false, GUIEditor.window[1] ) 
        guiGridListAddColumn( GUIEditor.gridlist[1], "Warp", 0.9 ) 
        guiGridListSetItemText( GUIEditor.gridlist[1], 0, 1, "-", false, false ) 
        for i,v in ipairs( warptaple ) do 
            local row = guiGridListAddRow( GUIEditor.gridlist[1] ) 
            guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) 
        end 
        GUIEditor.button[1] = guiCreateButton(64, 337, 236, 30, "Go ", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(78, 372, 205, 19, "close", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
addEventHandler( "onClientGUIClick", root, 
    function( ) 
        if source == GUIEditor.button[1] then 
            local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) 
            if row and col and row ~= -1 and col ~= -1 then 
                local get =  guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) 
                if get == "البداية " then 
                    triggerServerEvent( "a", localPlayer ) 
                elseif get == "الشارع الطويل" then 
                    triggerServerEvent( "b", localPlayer ) 
                elseif get == "المقر" then 
                    triggerServerEvent( "c", localPlayer ) 
                end 
            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...