SolideRock Posted March 26, 2016 Share Posted March 26, 2016 السلام عليكم ورحمه الله وبركاته بدي اعمل جريد ليست يكون فيه من 3 الى 4 خيارات عشان لما اختار سكن من القريد ليست واضغط على البوتون يعطيني السكن Link to comment
#|_oskar_|# Posted March 26, 2016 Share Posted March 26, 2016 وعليكم السلا ورحمة الله وبركاته اول شئ تسوي لوب وبعدين تستخدم الاكواد دي guiGridListAddRow -- يضيف رور guiGridListSetItemText -- يضيف نص guiGridListGetSelectedItem -- يجيب الشئ المحدد بالكولمن guiGridListGetItemText-- يجيب النص بالقريد اي شئ مافهمته تفضل قوله Link to comment
Abdul KariM Posted March 26, 2016 Share Posted March 26, 2016 وعليكم السلا ورحمة الله وبركاته اول شئ تسوي لوب وبعدين تستخدم الاكواد دي guiGridListAddRow -- يضيف رور guiGridListSetItemText -- يضيف نص guiGridListGetSelectedItem -- يجيب الشئ المحدد بالكولمن guiGridListGetItemText-- يجيب النص بالقريد اي شئ مافهمته تفضل قوله + triggerServerEvent setElementModel Link to comment
Mr.R Posted March 26, 2016 Share Posted March 26, 2016 (edited) تفضل هذا طلبك كامل , لاتنسخه وتمشي افهم كيف صارت الاكواد واذا منت فاهم شيء تفضل , اسأل عنه .. #Client local Skins = { { "ARMY", 287 }, { "SWAT", 285 }, -- { "Skin Name", iD }, -- ضيف كل السكنات الي تبيها لو مليون سكن } addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) Window1 = guiCreateWindow ( 247, 143, 639, 510, "Skin Window", false ) guiWindowSetSizable ( Window1, false ) guiSetVisible ( Window1, false ) GridList = guiCreateGridList ( 9, 21, 154, 452, false, Window1 ) guiGridListAddColumn ( GridList, "Skins...", 0.9 ) for _,v in ipairs ( Skins ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, 1, tostring ( v[1] ), false, false ) guiGridListSetItemData ( GridList, Row, 1, tonumber ( v[2] ) ) end Button1 = guiCreateButton ( 191, 350, 200, 49, "Change Skin", false, Window1 ) end ) bindKey ( "F5", "down", function ( ) guiSetVisible ( Window1, not guiGetVisible ( Window1 ) ) showCursor ( guiGetVisible ( Window1 ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local SkinName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) local SkiniD = guiGridListGetItemData( GridList, guiGridListGetSelectedItem( GridList ), 1 ) if ( SkinName ~= '' and SkiniD ~= '' ) then triggerServerEvent ( "Skin", localPlayer, SkiniD ) end else outputChatBox ( "* Please Select Skin", 0, 255, 0, true ) end end end ) #Server addEvent ( "Skin", true ) addEventHandler ( "Skin", root, function ( SkiniD ) setElementModel ( source, tonumber ( SkiniD ) ) outputChatBox ( "* Changed Skin", source, 255, 0, 0, true ) end ) Edited March 26, 2016 by Guest Link to comment
Me[Z]oO Posted March 26, 2016 Share Posted March 26, 2016 تفضل هذا طلبك كامل , لاتنسخه وتمشي افهم كيف صارت الاكوادواذا منت فاهم شيء تفضل , اسأل عنه .. #Client local Skins = { { "ARMY", 287 }, { "SWAT", 285 }, -- { "Skin Name", iD }, -- ضيف كل السكنات الي تبيها لو مليون سكن } addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) Window1 = guiCreateWindow ( 247, 143, 639, 510, "Skin Window", false ) guiWindowSetSizable ( Window1, false ) guiSetVisible ( Window1, false ) GridList = guiCreateGridList ( 9, 21, 154, 452, false, Window1 ) guiGridListAddColumn ( GridList, "Skins...", 0.9 ) for _,v in ipairs ( Skins ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, 1, tostring ( v[1] ), false, false ) guiGridListSetItemData ( GridList, Row, 1, tonumber ( v[2] ) ) end Button1 = guiCreateButton ( 191, 350, 200, 49, "Change Skin", false, Window1 ) end ) bindKey ( "F5", "down", function ( ) guiSetVisible ( Window1, not guiGetVisible ( Window1 ) ) showCursor ( guiGetVisible ( Window1 ) ) end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local SkinName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) local SkiniD = guiGridListGetItemData( GridList, guiGridListGetSelectedItem( GridList ), 1 ) if ( SkinName ~= '' and iD ~= '' ) then triggerServerEvent ( "Skin", localPlayer, SkiniD ) end else outputChatBox ( "* Please Select Skin", 0, 255, 0, true ) end end end ) #Server addEvent ( "Skin", true ) addEventHandler ( "Skin", root, function ( SkiniD ) setElementModel ( source, tonumber ( SkiniD ) ) outputChatBox ( "* Changed Skin", source, 255, 0, 0, true ) end ) سطر 31 بدل iD ب SkiniD Link to comment
Me[Z]oO Posted March 26, 2016 Share Posted March 26, 2016 ^ تم التعديلمشكور عالتنبيه العفو ي بطل 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