Jump to content

مساعدة في الجريد لست


Bee

Recommended Posts

السلام عليكم

شباب انا سويت مود وابغى اسوي جريد لست للـskins

حاولت ولا عرفت اسويها ابغى مساعده

هذا كودي :

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(501,189,343,419,"DiverMan",false) 
GUIEditor_Label[1] = guiCreateLabel(9,22,317,128,"In this job younksnsjdnvksdnkdsjv",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(18,359,127,49,"Have Job",false,GUIEditor_Window[1]) 
GUIEditor_Label[2] = guiCreateLabel(149,369,55,36,"OR",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(191,359,127,49,"Exit",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(19,249,305,104,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
guiSetVisible ( GUIEditor_Window[1], false ) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Skins",0.2) 
  
  
addEvent( "onHit", true ) 
addEventHandler( "onHit", getRootElement(),  
function () 
guiSetVisible ( GUIEditor_Window[1], true ) 
showCursor ( true )  
end ) 
  
addEventHandler( "onClientGUIClick", root, 
 function () 
 if ( source == GUIEditor_Button[1] ) then 
triggerServerEvent ( "onHave", localPlayer ) 
  
elseif ( source == GUIEditor_Button[2] ) then 
showCursor ( false ) 
guiSetVisible ( GUIEditor_Window[1], false ) 
 end 
    end )  

Link to comment

لم يتم التجربه ,

Skins = { 
    { 'Name', ID }, 
    { 'Name', ID }, 
    { 'Name', ID } 
} 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
GUIEditor_Window[1] = guiCreateWindow(501,189,343,419,"DiverMan",false) 
GUIEditor_Label[1] = guiCreateLabel(9,22,317,128,"In this job younksnsjdnvksdnkdsjv",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(18,359,127,49,"Have Job",false,GUIEditor_Window[1]) 
GUIEditor_Label[2] = guiCreateLabel(149,369,55,36,"OR",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(191,359,127,49,"Exit",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(19,249,305,104,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode( GUIEditor_Grid[1], 2 ) 
local Column = guiGridListAddColumn( GUIEditor_Grid[1], 'Skins', 0.2 ) 
guiSetVisible ( GUIEditor_Window[1], false ) 
for k,v in ipairs( Skins ) do 
local Row = guiGridListAddRow( GUIEditor_Grid[1] ) 
guiGridListSetItemText( GUIEditor_Grid[1],Row,Column, tostring(v[1]), false, false ) 
guiGridListSetItemData( GUIEditor_Grid[1],Row,Column, tostring(v[2])) 
end 
    
addEventHandler('onClientGUIClick',root, 
function() 
    if source == GUIEditor_Button[1] then local r,c = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) 
        if r and c and r ~= '' and c ~= '' then 
            local Set = tonumber( guiGridListGetItemData( GUIEditor_Grid[1], r, c ) ) 
                setElementModel( localPlayer, Set ) 
                    triggerServerEvent('onHave',localPlayer) 
                   elseif source == GUIEditor_Button[1] then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) 
            end 
        end 
    end 
) 
  
addEvent( "onHit", true ) 
addEventHandler( "onHit",root, 
function () 
    guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) 
    end 
) 

Name = اسم الشخصيه ذذ

ID = اي دي الشخصيه,

Link to comment

جربتة ضبط بس اذا ضغطت الزر ما يعطيك الشخصية , الكود هذا اللي سسويتة لي :

Skins = { 
    { 'Name', ID }, 
    { 'Name', ID }, 
    { 'Name', ID } 
} 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
GUIEditor_Window[1] = guiCreateWindow(501,189,343,419,"DiverMan",false) 
GUIEditor_Label[1] = guiCreateLabel(9,22,317,128,"In this job younksnsjdnvksdnkdsjv",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(18,359,127,49,"Have Job",false,GUIEditor_Window[1]) 
GUIEditor_Label[2] = guiCreateLabel(149,369,55,36,"OR",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(191,359,127,49,"Exit",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(19,249,305,104,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode( GUIEditor_Grid[1], 2 ) 
local Column = guiGridListAddColumn( GUIEditor_Grid[1], 'Skins', 0.2 ) 
guiSetVisible ( GUIEditor_Window[1], false ) 
for k,v in ipairs( Skins ) do 
local Row = guiGridListAddRow( GUIEditor_Grid[1] ) 
guiGridListSetItemText( GUIEditor_Grid[1],Row,Column, tostring(v[1]), false, false ) 
guiGridListSetItemData( GUIEditor_Grid[1],Row,Column, tostring(v[2])) 
end 
    
addEventHandler('onClientGUIClick',root, 
function() 
    if source == GUIEditor_Button[1] then local r,c = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) 
        if r and c and r ~= '' and c ~= '' then 
            local Set = tonumber( guiGridListGetItemData( GUIEditor_Grid[1], r, c ) ) 
                setElementModel( localPlayer, Set ) 
                    triggerServerEvent('onHave',localPlayer) 
                   elseif source == GUIEditor_Button[1] then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) 
            end 
        end 
    end 
) 
  
addEvent( "onHit", true ) 
addEventHandler( "onHit",root, 
function () 
    guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) 
    end 
) 

ابغى احط وظيفة اذا الاعب حدد على الجريد لست قبل لا يظغط الرز, كيف؟

Link to comment

بالنسبه قبل يضغط الزر راح تحتاج ,

onClientGUIClick للجريد ليست ذذ

guiGridListGetSelectedItem 
guiGridListGetItemText 
guiGridListGetSelectedItem 

بالنسبه للكود , جرب كذا,

Skins = { 
    { ID }, 
    { ID }, 
    { ID } 
} 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
GUIEditor_Window[1] = guiCreateWindow(501,189,343,419,"DiverMan",false) 
GUIEditor_Label[1] = guiCreateLabel(9,22,317,128,"In this job younksnsjdnvksdnkdsjv",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(18,359,127,49,"Have Job",false,GUIEditor_Window[1]) 
GUIEditor_Label[2] = guiCreateLabel(149,369,55,36,"OR",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(191,359,127,49,"Exit",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(19,249,305,104,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode( GUIEditor_Grid[1], 2 ) 
local Column = guiGridListAddColumn( GUIEditor_Grid[1], 'Skins', 0.2 ) 
for k,v in ipairs( Skins ) do 
local Row = guiGridListAddRow( GUIEditor_Grid[1] ) 
guiGridListSetItemText( GUIEditor_Grid[1],Row,Column, v[1], false, false ) 
guiGridListSetItemData( GUIEditor_Grid[1],Row,Column, v[2]) 
end 
    
  
  
addEventHandler('onClientGUIClick',root, 
function() 
    if source == GUIEditor_Button[1] then  
        if guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) ~= -1 then 
            local Set = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
                if ( Set ) then  
                    setElementModel( localPlayer, Set ) 
                    triggerServerEvent('onHave',localPlayer) 
                   elseif source == GUIEditor_Button[1] then 
                   guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) 
                end 
            end 
        end 
    end 
) 

بالنسبه لـ ID لازم تغيره ,

مثال ,

Skins = { 
    { 1 }, 
    { 2 }, 
    { 0 } 
} 
Link to comment
لم يتم التجربه ,

Skins = { 
    { 'Name', ID }, 
    { 'Name', ID }, 
    { 'Name', ID } 
} 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
GUIEditor_Window[1] = guiCreateWindow(501,189,343,419,"DiverMan",false) 
GUIEditor_Label[1] = guiCreateLabel(9,22,317,128,"In this job younksnsjdnvksdnkdsjv",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(18,359,127,49,"Have Job",false,GUIEditor_Window[1]) 
GUIEditor_Label[2] = guiCreateLabel(149,369,55,36,"OR",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(191,359,127,49,"Exit",false,GUIEditor_Window[1]) 
GUIEditor_Grid[1] = guiCreateGridList(19,249,305,104,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode( GUIEditor_Grid[1], 2 ) 
local Column = guiGridListAddColumn( GUIEditor_Grid[1], 'Skins', 0.2 ) 
guiSetVisible ( GUIEditor_Window[1], false ) 
for k,v in ipairs( Skins ) do 
local Row = guiGridListAddRow( GUIEditor_Grid[1] ) 
guiGridListSetItemText( GUIEditor_Grid[1],Row,Column, tostring(v[1]), false, false ) 
guiGridListSetItemData( GUIEditor_Grid[1],Row,Column, tostring(v[2])) 
end 
    
addEventHandler('onClientGUIClick',root, 
function() 
    if source == GUIEditor_Button[1] then local r,c = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) 
        if r and c and r ~= '' and c ~= '' then 
            local Set = tonumber( guiGridListGetItemData( GUIEditor_Grid[1], r, c ) ) 
                setElementModel( localPlayer, Set ) 
                    triggerServerEvent('onHave',localPlayer) 
                   elseif source == GUIEditor_Button[1] then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) 
            end 
        end 
    end 
) 
  
addEvent( "onHit", true ) 
addEventHandler( "onHit",root, 
function () 
    guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) 
    end 
) 

Name = اسم الشخصيه ذذ

ID = اي دي الشخصيه,

guiGridListSetItemText( GUIEditor_Grid[1],Row,Column, tostring(v[1]), false, false ) 

tostring > مالها أي داعي الآن الجدول نفسة سترنق اللي بتستخرجة / =

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