^#Dream Posted July 20, 2014 Share Posted July 20, 2014 السلام عليكم انا عدلت على سكربت عاشق الشرق حق توب 30 خليتها بدال صور بـتاب بانل بس المشكلة القريد لست ماتطلع function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "Images/img.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 0, 0, " "..titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end _getPlayerName = getPlayerName function getPlayerName(player) return string.gsub(_getPlayerName(player), "#%x%x%x%x%x%x", "" ) end TopWindow = guiCreateWindow(188, 109, 476, 390, ":: [H.H] - Top Players ::", false) guiSetVisible(TopWindow, false) guiSetAlpha(TopWindow, 1.00) TabPanel = guiCreateTabPanel(9, 24, 457, 356, false, TopWindow) TopDrift = guiCreateTab("Level", TabPanel) TopTime = guiCreateTab("PlayTime", TabPanel) TopMoney = guiCreateTab("Money", TabPanel) guiSetAlpha ( TopDrift, 1.00 ) guiSetAlpha ( TopTime, 1.00 ) guiSetAlpha ( TopMoney, 1.00 ) centerWindow(TopWindow) font = guiCreateFont ( 'Fonts/Font.TTF', 10 ) DriftList = guiCreateGridList(5, 2, 446, 324, false, TopWindow) guiGridListSetSortingEnabled( DriftList, false ) RankColumn = guiGridListAddColumn(DriftList, "Rank", 0.1) NameColumn = guiGridListAddColumn(DriftList, "Player Name", 0.5) TotalColumn = guiGridListAddColumn(DriftList, "[H.H] Level", 0.3) guiSetProperty( DriftList, 'Disabled', 'True' ) guiSetAlpha( DriftList, 1 ) guiSetFont( DriftList, font ) guiSetVisible(DriftList, false) TimeList = guiCreateGridList(5, 3, 447, 323, false, TopWindow) guiGridListSetSortingEnabled( TimeList, false ) guiGridListAddColumn(TimeList, "Rank", 0.1) guiGridListAddColumn(TimeList, "Player Name", 0.5) guiGridListAddColumn(TimeList, "[H.H] Total Play Time", 0.3) guiSetProperty( TimeList, 'Disabled', 'True' ) guiSetAlpha( TimeList, 1 ) guiSetFont( TimeList, font ) guiSetVisible(TimeList, false) MoneyList = guiCreateGridList(4, 3, 449, 323, false, TopWindow) guiGridListSetSortingEnabled( MoneyList, false ) guiGridListAddColumn(MoneyList, "Rank", 0.1) guiGridListAddColumn(MoneyList, "Player Name", 0.5) guiGridListAddColumn(MoneyList, "[H.H] Total Money", 0.3) guiSetProperty( MoneyList, 'Disabled', 'True' ) guiSetAlpha( MoneyList, 1 ) guiSetFont( MoneyList, font ) guiSetVisible(MoneyList, false) addEventHandler ( "onClientMouseEnter", root, function ( ) if source == TopDrift then guiSetAlpha ( TopDrift, 1 ) playSoundFrontEnd ( 3 ) elseif source == TopTime then guiSetAlpha ( TopTime, 1 ) playSoundFrontEnd ( 3 ) elseif source == TopMoney then guiSetAlpha ( TopMoney, 1 ) playSoundFrontEnd ( 3 ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == TopDrift then if guiGetVisible ( DriftList ) == false then guiSetAlpha ( TopDrift, 0.3 ) end elseif source == TopTime then if guiGetVisible ( TimeList ) == false then guiSetAlpha ( TopTime, 0.3 ) end elseif source == TopMoney then if guiGetVisible ( MoneyList ) == false then guiSetAlpha ( TopMoney, 0.3 ) end end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == TopDrift then guiSetAlpha ( TopDrift, 1 ) guiSetAlpha ( TopTime, 0.3 ) guiSetAlpha ( TopMoney, 0.3 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( DriftList ) == false then guiSetVisible ( DriftList, true ) end if guiGetVisible ( TimeList ) then guiSetVisible ( TimeList, false ) end if guiGetVisible ( MoneyList ) then guiSetVisible ( MoneyList, false ) end elseif source == TopScore then guiSetAlpha ( TopDrift, 0.3 ) guiSetAlpha ( TopTime, 0.3 ) guiSetAlpha ( TopMoney, 0.3 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( DriftList ) then guiSetVisible ( DriftList, false ) end if guiGetVisible ( TimeList ) then guiSetVisible ( TimeList, false ) end if guiGetVisible ( MoneyList ) then guiSetVisible ( MoneyList, false ) end elseif source == TopTime then guiSetAlpha ( TopDrift, 0.3 ) guiSetAlpha ( TopScore, 0.3 ) guiSetAlpha ( TopTime, 1 ) guiSetAlpha ( TopMoney, 0.3 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( TimeList ) == false then guiSetVisible ( TimeList, true ) end if guiGetVisible ( DriftList ) then guiSetVisible ( DriftList, false ) end if guiGetVisible ( ScoreList ) then guiSetVisible ( ScoreList, false ) end if guiGetVisible ( MoneyList ) then guiSetVisible ( MoneyList, false ) end elseif source == TopMoney then guiSetAlpha ( TopDrift, 0.3 ) guiSetAlpha ( TopScore, 0.3 ) guiSetAlpha ( TopTime, 0.3 ) guiSetAlpha ( TopMoney, 1 ) playSoundFrontEnd ( 13 ) if guiGetVisible ( MoneyList ) == false then guiSetVisible ( MoneyList, true ) end if guiGetVisible ( DriftList ) then guiSetVisible ( DriftList, false ) end if guiGetVisible ( ScoreList ) then guiSetVisible ( ScoreList, false ) end if guiGetVisible ( TimeList ) then guiSetVisible ( TimeList, false ) end end end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function getPlayersSortByDrif( ) local Top = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( Top, { player = aPlayer, aDrif = getElementData ( aPlayer, 'Level' ) or 0 } ) end table.sort( Top, function( a, b ) return( tonumber( a.aDrif ) or 0 ) > ( tonumber( b.aDrif ) or 0 ) end ) return Top end function getPlayersSortByaScore( ) local TopScore = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( TopScore, { player = aPlayer, aScore = getElementData ( aPlayer, 'kills' ) or 0 } ) end table.sort( TopScore, function( a, b ) return( tonumber( a.aScore ) or 0 ) > ( tonumber( b.aScore ) or 0 ) end ) return TopScore end function getPlayersSortByaTime( ) local TopTimer = { } for _, aPlayer in next, getElementsByType 'player' do Time = getElementData ( aPlayer, 'Time' ) or "0:0:0" local h, m, s = unpack ( split ( Time, ":" ) ) table.insert ( TopTimer, { player = aPlayer, Time = Time, SortTime = ( tonumber ( h ) * 3600000 + tonumber ( m ) * 60000 + tonumber ( s ) * 1000 ) } ) end table.sort ( TopTimer, function ( a, b ) return ( tonumber ( a.SortTime ) or 0 ) > ( tonumber ( b.SortTime ) or 0 ) end ) return TopTimer end function getPlayersSortByaMoney( ) local TopMoney = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( TopMoney, { player = aPlayer, aMoney = getElementData( aPlayer, 'xTopsMoeny' ) or 0 } ) Link to comment
#DRAGON!FIRE Posted July 20, 2014 Share Posted July 20, 2014 متاكد انك معرف الصورة بالميتا ومتاكد من اسم ومسار الصورة ؟ .. اعتقد الاكواد مزروفةة ذذ Link to comment
^#Dream Posted July 20, 2014 Author Share Posted July 20, 2014 مهي مزروفهه عاشق الشرق منزل السكربت بالكمونتي بعدين هو كان حاطها صور تضغط على الصوره يفتح لك القريد لست انا بدلتها حطيتها تاب Link to comment
#DRAGON!FIRE Posted July 20, 2014 Share Posted July 20, 2014 مهي مزروفهه عاشق الشرق منزل السكربت بالكمونتيبعدين هو كان حاطها صور تضغط على الصوره يفتح لك القريد لست انا بدلتها حطيتها تاب مو انت اقصد .. الاكواد ذي موب حقه ذذ شف الديبوق وش يقول ؟ Link to comment
EH10 Posted July 20, 2014 Share Posted July 20, 2014 مهي مزروفهه عاشق الشرق منزل السكربت بالكمونتيبعدين هو كان حاطها صور تضغط على الصوره يفتح لك القريد لست انا بدلتها حطيتها تاب مو انت اقصد .. الاكواد ذي موب حقه ذذ شف الديبوق وش يقول ؟ الـمود حق عاشق وعـدلة عناد خـلاهـ أفضل , وسـمـح بنشرهـ لـ عاشق الشرق Link to comment
#DRAGON!FIRE Posted July 20, 2014 Share Posted July 20, 2014 https://forum.multitheftauto.com/viewtopic.php?f ... table.sort لاحظ نفس الاكواد حق طلأل Link to comment
EH10 Posted July 20, 2014 Share Posted July 20, 2014 https://forum.multitheftauto.com/viewtopic.php?f=160&t=71313&hilit=table.sortلاحظ نفس الاكواد حق طلأل يـب , بس فـية فـرق خـفيف بللأكواد Link to comment
EH10 Posted July 20, 2014 Share Posted July 20, 2014 = زرف . ذذ تععتقد من زرف عناد ولا عاشق الشرق Link to comment
#DRAGON!FIRE Posted July 20, 2014 Share Posted July 20, 2014 الله اعلم .. اعتقد عاشق الشرق .. عناد ما يزرف ذذ بس ممكن عناد ولله اعلم المهم ما نبي نغير مسار الموضوع اطرح الميتا .. ذذ Link to comment
^#Dream Posted July 20, 2014 Author Share Posted July 20, 2014 اوكك -- 6ArH Servers --> "TopOnline" author="3NAD and M7mdAl7arthy" type="script" version="1.0" description="NONE." /> Link to comment
#DRAGON!FIRE Posted July 20, 2014 Share Posted July 20, 2014 غريب .. طيب فك الديبوق وسوي ريستارات لو ما جا خطا .. فك اللوحة وشف في اي اخطاء Link to comment
EH10 Posted July 20, 2014 Share Posted July 20, 2014 أسـمع تـشوف , DriftList = guiCreateGridList(5, 2, 446, 324, false, TopWindow) ففـي أخرهـ , TopWindow بـدلها لـ TabPanel تـصـير كـذا DriftList = guiCreateGridList(5, 2, 446, 324, false, TabPanel) Link to comment
^#Dream Posted July 20, 2014 Author Share Posted July 20, 2014 ^ زبط بس المشكلة انه يسوي 3 تابات فاضية ماعليها اسم ويحط عليها القريد لست مايحطها بالتابات الي انا مسميها Money , PlayTime , Level Link to comment
shwaeki Posted July 20, 2014 Share Posted July 20, 2014 تفضل function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end _getPlayerName = getPlayerName function getPlayerName(player) return string.gsub(_getPlayerName(player), "#%x%x%x%x%x%x", "" ) end TopWindow = guiCreateWindow(188, 109, 476, 390, ":: [H.H] - Top Players ::", false) guiSetVisible(TopWindow, false) guiSetAlpha(TopWindow, 1.00) TabPanel = guiCreateTabPanel(9, 24, 457, 356, false, TopWindow) TopDrift = guiCreateTab("Level", TabPanel) TopTime = guiCreateTab("PlayTime", TabPanel) TopMoney = guiCreateTab("Money", TabPanel) guiSetAlpha ( TopDrift, 1.00 ) guiSetAlpha ( TopTime, 1.00 ) guiSetAlpha ( TopMoney, 1.00 ) centerWindow(TopWindow) font = guiCreateFont ( 'Fonts/Font.TTF', 10 ) DriftList = guiCreateGridList(5, 2, 446, 324, false, TopDrift) guiGridListSetSortingEnabled( DriftList, false ) RankColumn = guiGridListAddColumn(DriftList, "Rank", 0.1) NameColumn = guiGridListAddColumn(DriftList, "Player Name", 0.5) TotalColumn = guiGridListAddColumn(DriftList, "[H.H] Level", 0.3) guiSetProperty( DriftList, 'Disabled', 'True' ) guiSetAlpha( DriftList, 1 ) guiSetFont( DriftList, font ) TimeList = guiCreateGridList(5, 3, 447, 323, false, TopTime) guiGridListSetSortingEnabled( TimeList, false ) guiGridListAddColumn(TimeList, "Rank", 0.1) guiGridListAddColumn(TimeList, "Player Name", 0.5) guiGridListAddColumn(TimeList, "[H.H] Total Play Time", 0.3) guiSetProperty( TimeList, 'Disabled', 'True' ) guiSetAlpha( TimeList, 1 ) guiSetFont( TimeList, font ) MoneyList = guiCreateGridList(4, 3, 449, 323, false, TopMoney) guiGridListSetSortingEnabled( MoneyList, false ) guiGridListAddColumn(MoneyList, "Rank", 0.1) guiGridListAddColumn(MoneyList, "Player Name", 0.5) guiGridListAddColumn(MoneyList, "[H.H] Total Money", 0.3) guiSetProperty( MoneyList, 'Disabled', 'True' ) guiSetAlpha( MoneyList, 1 ) guiSetFont( MoneyList, font ) addEventHandler ( "onClientMouseEnter", root, function ( ) if source == TopDrift then guiSetAlpha ( TopDrift, 1 ) playSoundFrontEnd ( 3 ) elseif source == TopTime then guiSetAlpha ( TopTime, 1 ) playSoundFrontEnd ( 3 ) elseif source == TopMoney then guiSetAlpha ( TopMoney, 1 ) playSoundFrontEnd ( 3 ) end end ) addEventHandler ( "onClientMouseLeave", root, function ( ) if source == TopDrift then if guiGetVisible ( DriftList ) == false then guiSetAlpha ( TopDrift, 0.3 ) end elseif source == TopTime then if guiGetVisible ( TimeList ) == false then guiSetAlpha ( TopTime, 0.3 ) end elseif source == TopMoney then if guiGetVisible ( MoneyList ) == false then guiSetAlpha ( TopMoney, 0.3 ) end end end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function getPlayersSortByDrif( ) local Top = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( Top, { player = aPlayer, aDrif = getElementData ( aPlayer, 'Level' ) or 0 } ) end table.sort( Top, function( a, b ) return( tonumber( a.aDrif ) or 0 ) > ( tonumber( b.aDrif ) or 0 ) end ) return Top end function getPlayersSortByaScore( ) local TopScore = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( TopScore, { player = aPlayer, aScore = getElementData ( aPlayer, 'kills' ) or 0 } ) end table.sort( TopScore, function( a, b ) return( tonumber( a.aScore ) or 0 ) > ( tonumber( b.aScore ) or 0 ) end ) return TopScore end function getPlayersSortByaTime( ) local TopTimer = { } for _, aPlayer in next, getElementsByType 'player' do Time = getElementData ( aPlayer, 'Time' ) or "0:0:0" local h, m, s = unpack ( split ( Time, ":" ) ) table.insert ( TopTimer, { player = aPlayer, Time = Time, SortTime = ( tonumber ( h ) * 3600000 + tonumber ( m ) * 60000 + tonumber ( s ) * 1000 ) } ) end table.sort ( TopTimer, function ( a, b ) return ( tonumber ( a.SortTime ) or 0 ) > ( tonumber ( b.SortTime ) or 0 ) end ) return TopTimer end function getPlayersSortByaMoney( ) local TopMoney = { } for _, aPlayer in next, getElementsByType 'player' do table.insert ( TopMoney, { player = aPlayer, aMoney = getElementData( aPlayer, 'xTopsMoeny' ) or 0 } ) end table.sort( TopMoney, function( a, b ) return( tonumber( a.aMoney ) or 0 ) > ( tonumber( b.aMoney ) or 0 ) end ) return TopMoney end setTimer ( function ( ) guiGridListClear( DriftList ) local g = getPlayersSortByDrif ( ) for i = 1, 20 do local aRow = guiGridListAddRow( DriftList ) if ( g [ i ] )then guiGridListSetItemText( DriftList, aRow, 1, i ..'-', false, false ) guiGridListSetItemText( DriftList, aRow, 2, getPlayerName ( g [ i ].player ), false, false ) guiGridListSetItemText( DriftList, aRow, 3, convertNumber( g [ i ].aDrif ), false, false ) guiGridListSetItemColor( DriftList, aRow, 2, getPlayerNametagColor( g [ i ].player ) ) guiGridListSetItemColor( DriftList, aRow, 1, 255, 255, 0 ) guiGridListSetItemColor( DriftList, aRow, 3, 0, 255, 0 ) end end end , 5000, 0 ) setTimer ( function ( ) guiGridListClear( TimeList ) local g = getPlayersSortByaTime ( ) for i = 1, 20 do local aRow = guiGridListAddRow( TimeList ) if ( g [ i ] )then guiGridListSetItemText( TimeList, aRow, 1, i ..'-', false, false ) guiGridListSetItemText( TimeList, aRow, 2, getPlayerName ( g [ i ].player ), false, false ) guiGridListSetItemText( TimeList, aRow, 3, convertNumber( g [ i ].Time ), false, false ) guiGridListSetItemColor( TimeList, aRow, 2, getPlayerNametagColor( g [ i ].player ) ) guiGridListSetItemColor( TimeList, aRow, 1, 255, 255, 0 ) guiGridListSetItemColor( TimeList, aRow, 3, 0, 255, 0 ) end end end , 7000, 0 ) setTimer ( function ( ) guiGridListClear( MoneyList ) local g = getPlayersSortByaMoney ( ) for i = 1, 20 do local aRow = guiGridListAddRow( MoneyList ) if ( g [ i ] )then guiGridListSetItemText( MoneyList, aRow, 1, i ..'-', false, false ) guiGridListSetItemText( MoneyList, aRow, 2, getPlayerName ( g [ i ].player ), false, false ) guiGridListSetItemText( MoneyList, aRow, 3, "$"..convertNumber( g [ i ].aMoney ), false, false ) guiGridListSetItemColor( MoneyList, aRow, 2, getPlayerNametagColor( g [ i ].player ) ) guiGridListSetItemColor( MoneyList, aRow, 1, 255, 255, 0 ) guiGridListSetItemColor( MoneyList, aRow, 3, 0, 255, 0 ) end end end , 5000, 0 ) function TopDriftW( ) guiSetVisible ( TopWindow, not guiGetVisible(TopWindow) ) showCursor ( guiGetVisible(TopWindow) ) end bindKey( 'F7', 'down', TopDriftW ) Link to comment
^#Dream Posted July 20, 2014 Author Share Posted July 20, 2014 طيب التوب درفت مايشتغل يعني لو اهجول والدرفت يصير مثلا 10 الاف مايجي بالقريد لست 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