Bee Posted July 20, 2013 Share Posted July 20, 2013 السلام عليكم شباب انا سويت مود وابغى اسوي جريد لست للـ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
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 تبي تحط شخصيات محدده ولا كلها ؟ Link to comment
Bee Posted July 20, 2013 Author Share Posted July 20, 2013 تبي تحط شخصيات محدده ولا كلها ؟ لا ابغى شخصيات محدده , انت حط لي اي شخصية وانا اغيرها Link to comment
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 طيب تبيه اذا ضغط الزر تعطيه ولا كيف؟ Link to comment
Bee Posted July 20, 2013 Author Share Posted July 20, 2013 طيب تبيه اذا ضغط الزر تعطيه ولا كيف؟ ابغى اذا كان محدد على الشخصية وضغط الرز يعطيه Link to comment
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 لم يتم التجربه , 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
Bee Posted July 20, 2013 Author Share Posted July 20, 2013 طيب لو بغيت الآي دي بدل الاسم ؟ يعني في الجريد لست يطلع الآي دي ؟ Link to comment
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 غير الجدول خليه كذا بس , Skins = { { ID }, { ID }, { ID } } ID = اي دي الشخصيه ذذ Link to comment
Bee Posted July 20, 2013 Author Share Posted July 20, 2013 جربتة ضبط بس اذا ضغطت الزر ما يعطيك الشخصية , الكود هذا اللي سسويتة لي : 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
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 بالنسبه قبل يضغط الزر راح تحتاج , 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
iPrestege Posted July 20, 2013 Share Posted July 20, 2013 لم يتم التجربه , 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
فاّرس Posted July 20, 2013 Share Posted July 20, 2013 اي انتهبت لها لو تلاحظ بالكود الي فوقه حذقتها ذذ Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now