i S6O Posted May 19, 2015 Share Posted May 19, 2015 (edited) Where Big here / وين الخطاء هنا -- Client Side GridList = guiCreateGridList(9, 20, 183, 248, false, Window) guiGridListAddColumn(GridList, "vehicle", 0.5) guiGridListAddColumn(GridList, "$ money", 0.5) Vehilce = { { "v1",30000}, { "V2",50000}, } for i, v in ipairs ( Vehilce ) do row = guiGridListAddRow(GridList) guiGridListSetItemText ( GridList, row, 1, v [ 1 ], false, false ) guiGridListSetItemText ( GridList, row, 2, v [ 2 ], false, false ) end function onUp ( ) guiGridListSetItemColor(GridList, row, 2, 0, 255, 0, 0) end addEvent( "onUpMoney", true ) addEventHandler( "onUpMoney", localPlayer, onUp ) function onDown ( ) guiGridListSetItemColor(GridList, row, 2, 0, 255, 0, 255) end addEvent( "onDownMoney", true ) addEventHandler( "onDownMoney", localPlayer, onDown ) -- Server Side function GetAllMoney ( ) local playername = getPlayerName ( source ) if ( getPlayerMoney ( source ) >=30000 ) then triggerClientEvent ( source,"onUpMoney",source ) elseif ( getPlayerMoney ( source ) <=30000 ) then triggerClientEvent ( source,"onDownMoney",source ) end end debugscript - side nothing / الديبوق سكربت مايقول شيء edit / عدلته المشكلة مايغير لون الرو بالقريد لسيت Edited May 19, 2015 by Guest Link to comment
Mr.R Posted May 19, 2015 Share Posted May 19, 2015 (edited) #Client GridList = guiCreateGridList ( 9, 20, 183, 248, false, Window ) guiGridListAddColumn ( GridList, "vehicle", 0.5 ) guiGridListAddColumn ( GridList, "$ money", 0.5 ) Vehilce = { [ 1 ] = { "Savana", 30000 }, -- هنا حط اسم السياره + السعر [ 2 ] = { "Bobcat", 50000 }, } for i,v in ipairs ( Vehilce ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, 1, v[ 1 ], false, false ) guiGridListSetItemText ( GridList, Row, 2, "$"..v[ 2 ], false, false ) guiGridListSetItemData ( GridList, Row, 1, v[2] ) end addEvent ( "onUpMoney", true ) addEventHandler ( "onUpMoney", root, function onUp( ) guiGridListSetItemColor ( GridList, Row, 2, 0, 255, 0, 0 ) end ) addEvent ( "onDownMoney", true ) addEventHandler ( "onDownMoney", root, function onDown( ) guiGridListSetItemColor ( GridList, Row, 2, 0, 255, 0, 255 ) end ) #Server function ( ) local PlayerMoney = getPlayerMoney ( source ) if ( PlayerMoney ( source ) >= 30000 ) then triggerClientEvent ( source ,"onUpMoney", source ) elseif ( PlayerMoney ( source ) <= 30000 ) then triggerClientEvent ( source ,"onDownMoney", source ) end end debugscript 3 < جرب كذا واذا فيه اي مشكله شف الديبوق وش يقول وعطني خبر ^ Edited May 19, 2015 by Guest Link to comment
Mr.R Posted May 19, 2015 Share Posted May 19, 2015 انت مو معرف الـ row row = guiGridListAddRow ( GridList ) -_-" Link to comment
i S6O Posted May 19, 2015 Author Share Posted May 19, 2015 ERROR: Loading script failed: .. S.lua:27:''expected near '(' ERROR: Loading s... C.lua: 142: '(' expected near'onUp' Link to comment
Mr.R Posted May 19, 2015 Share Posted May 19, 2015 ^ عندك نقص او تسكير قوس من جانب سيرفر سطر 27 ومن جانب كلنت نفس الشيء سطر 142 Link to comment
i S6O Posted May 19, 2015 Author Share Posted May 19, 2015 سويت الي قلته وماصار شيء راح خطأ الديبوق لكن باقي ماصار لون للقريد لسيت + انا ابيه لـ عمود معين Link to comment
Mr.R Posted May 19, 2015 Share Posted May 19, 2015 سويت الي قلته وماصار شيء والله مادري شف المشكله الي قلت لك عنها حاول فيها لان مصدر المشكله هناك وبسألك سؤال اكوادك الي طرحتها بالموضوع فوق كانت تشتغل بشكل صحيح بس الروات ماتتلون ؟ Link to comment
i S6O Posted May 19, 2015 Author Share Posted May 19, 2015 الي ابي اسويه ان اذا فلوس الاعب + اكثر من 30 الف يصير لون الروات الي في عمود اخضر واذا اقل من 30 الف يصير لون الروات الي في عمود احمر نص الاكواد ماخذها من سكربت قديم لقيته وقليت نفس الفكره لكن قلت اطورها Link to comment
shwaeki Posted May 19, 2015 Share Posted May 19, 2015 ما يحتاج ملف سيرفر اصلا بس لو تخليه يساوي لوب لما تفتح له الوحه عشين يجدد الاوان GridList = guiCreateGridList ( 9, 20, 183, 248, false, Window ) guiGridListAddColumn ( GridList, "vehicle", 0.5 ) guiGridListAddColumn ( GridList, "$ money", 0.5 ) Vehilce = { [ 1 ] = { "Savana", 30000 }, -- هنا حط اسم السياره + السعر [ 2 ] = { "Bobcat", 50000 }, } for i,v in ipairs ( Vehilce ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, 1, v[ 1 ], false, false ) guiGridListSetItemText ( GridList, Row, 2, "$"..v[ 2 ], false, false ) guiGridListSetItemData ( GridList, Row, 1, v[2] ) if getPlayerMoney() >= 30000 ) then guiGridListSetItemColor ( GridList, Row, 2, 0, 255, 0 ) else guiGridListSetItemColor ( GridList, Row, 2, 255, 0, 0 ) end end Link to comment
i S6O Posted May 19, 2015 Author Share Posted May 19, 2015 تمت الافادة يغلق < Thx Husain-[25]~ Mr.R shwaeki 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