L3yr Posted November 6, 2017 Share Posted November 6, 2017 شباب الخير انا بعمل لوحه بجريد ليست تشترى منه اسلحه عوز فنكشناتو وعوز فنكشن ابرمج الاديت عشان اكتب كام رصاصه عوزو وشكرا مقدما Link to comment
Wormen Posted November 6, 2017 Share Posted November 6, 2017 guiGridListGetItemText 1 Link to comment
Doffy Posted November 7, 2017 Share Posted November 7, 2017 (edited) -----------------------------------------------Client m = createMarker "onClientMarkerHit" "onClientGUIChanged" "onClientGUIClick" guiGridListGetItemData guiGetText guiSetText guiSetVisible guiGridListGetSelectedItem getElementType isPedInVehicle -- then return end triggerServerEvent -----------------------------------------------Server addEvent addEventHandler getPlayerMoney giveWeapon takePlayerMoney outputChatBox مش مرتبين Edited November 7, 2017 by #Himoo 2 Link to comment
^iiEcoo'x_) Posted November 7, 2017 Share Posted November 7, 2017 table guiGridListAddRow guiGridListSetItemText guiGridListSetItemData addEventHandler 'onClientGUIClick' guiGridListGetSelectedItem guiGridListGetItemData guiGetText math.ceil triggerServerEvent addEvent addEventHandler getPlayerMoney takePlayerMoney giveWeapon Ex. to table : local WeaponTable = { { 'AK - 47' , 31 , 2000 } } -- { Weapon Name , Id Weapon , Ammount of Clip } Ex. to loop of table : for i , v in ipairs ( WeaponTable ) do outputChatBox ( v [ 1 ] ) -- Result : AK - 47 outputChatBox ( v [ 3 ] ) -- Result : 2000 end math.ceil ? -- CLip of M4 ( 50 ) guiSetText ( SomeEdit , '55.3' ) -- this is ammount of clip math.ceil ( guiGetText ( SomeEdit ) ) -- Result : 55 ! 2 Link to comment
L3yr Posted November 7, 2017 Author Share Posted November 7, 2017 29 minutes ago, DABL said: table guiGridListAddRow guiGridListSetItemText guiGridListSetItemData addEventHandler 'onClientGUIClick' guiGridListGetSelectedItem guiGridListGetItemData guiGetText math.ceil triggerServerEvent addEvent addEventHandler getPlayerMoney takePlayerMoney giveWeapon Ex. to table : local WeaponTable = { { 'AK - 47' , 31 , 2000 } } -- { Weapon Name , Id Weapon , Ammount of Clip } Ex. to loop of table : for i , v in ipairs ( WeaponTable ) do outputChatBox ( v [ 1 ] ) -- Result : AK - 47 outputChatBox ( v [ 3 ] ) -- Result : 2000 end math.ceil ? -- CLip of M4 ( 50 ) guiSetText ( SomeEdit , '55.3' ) -- this is ammount of clip math.ceil ( guiGetText ( SomeEdit ) ) -- Result : 55 ! شكرا جدا Link to comment
^iiEcoo'x_) Posted November 7, 2017 Share Posted November 7, 2017 Just now, L3yr said: شكرا جدا هلا بالحشم . 2 Link to comment
L3yr Posted November 7, 2017 Author Share Posted November 7, 2017 (edited) 2 hours ago, DABL said: هلا بالحشم . عملتو كده والاسلحه مش بتيجى ف القريد ايه المشكله هل الجدول فيه اخطاء ياريت التصحيح local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } , } --______________________________________________________________________________________________ for _,i in ipairs ( Weapons ) do row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiGridListSetItemData ( gridList, aa ) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) Edited November 7, 2017 by L3yr Link to comment
H25 Posted November 8, 2017 Share Posted November 8, 2017 14 hours ago, L3yr said: عملتو كده والاسلحه مش بتيجى ف القريد ايه المشكله هل الجدول فيه اخطاء ياريت التصحيح local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } , } --______________________________________________________________________________________________ for _,i in ipairs ( Weapons ) do row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiGridListSetItemData ( gridList, aa ) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) انت مسوي اكواد الاضافة للقريد لست قبل انشاء القريد لست نفسه 1 Link to comment
L3yr Posted November 8, 2017 Author Share Posted November 8, 2017 2 hours ago, Husain-[25]~ said: انت مسوي اكواد الاضافة للقريد لست قبل انشاء القريد لست نفسه عملته كده وبرضو مش نافع local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 - 47' , 31 , 2000 } , } ---- function MakkyWP() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiSetAlpha(gridlist1, 0.80) guiGridListSetItemData ( gridList, MakkyWP ) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, MakkyWP ) ---- for _,i in ipairs ( Weapons ) do row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i),false,false) end Link to comment
iMr.WiFi..! Posted November 8, 2017 Share Posted November 8, 2017 (edited) 2 hours ago, Husain-[25]~ said: انت مسوي اكواد الاضافة للقريد لست قبل انشاء القريد لست نفسه مافرقت أخوي ,لانه حطه بفنكشن ومسويه بحدث عند تشغيل المود : ) 17 hours ago, L3yr said: عملتو كده والاسلحه مش بتيجى ف القريد ايه المشكله هل الجدول فيه اخطاء ياريت التصحيح local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } , } --______________________________________________________________________________________________ for _,i in ipairs ( Weapons ) do row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiGridListSetItemData ( gridList, aa ) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) جرب كذا : local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } } --______________________________________________________________________________________________ local gridlist for _,i in ipairs ( Weapons ) do local row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i[1]),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) Edited November 8, 2017 by iMr.WiFi..! Link to comment
L3yr Posted November 8, 2017 Author Share Posted November 8, 2017 2 minutes ago, iMr.WiFi..! said: مافرقت أخوي ,لانه حطه بفنكشن ومسويه بحدث عند تشغيل المود : ), جرب كذا : local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } } --______________________________________________________________________________________________ local gridlist for _,i in ipairs ( Weapons ) do local row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i[1]),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiGridListSetItemData ( gridList, aa ) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) برضو القريد فاضى مش بيجى فيه الى مكتوب ف الجدول Link to comment
iMr.WiFi..! Posted November 8, 2017 Share Posted November 8, 2017 (edited) local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } } gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist, 0.80) guiSetVisible(gridlist,false) --______________________________________________________________________________________________ for _,i in ipairs ( Weapons ) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist,row,1,getWeaponNameFromID(i[1]),false,false) end --______________________________________________________________________________________________ جرب ^^ ( المشكلة كانت انه اسم الجريد ليست غير عن الي صنعته والي اضفت فيه الرو Edited November 8, 2017 by iMr.WiFi..! عدلت الكود ! 1 1 Link to comment
L3yr Posted November 8, 2017 Author Share Posted November 8, 2017 3 minutes ago, iMr.WiFi..! said: local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } } --______________________________________________________________________________________________ local gridlist for _,i in ipairs ( Weapons ) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist,row,1,getWeaponNameFromID(i[1]),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiGridListSetItemData ( gridList, aa ) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) جرب ^^ ( المشكلة كانت انه اسم الجريد ليست غير عن الي صنعته والي اضفت فيه الرو شكرا جدا... اصلا انا نوب شويه ف الجريد ليست Link to comment
1337.Ibrahim Posted November 8, 2017 Share Posted November 8, 2017 local Weapons = { {30 , 2000 } , {31 , 3000 } } gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist, 0.80) addEventHandler ( "onClientResourceStart" , root , function ( ) for i,v in ipairs (Weapons) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getWeaponNameFromID (v[1]), false, false ) guiGridListSetItemText ( gridlist, row, 2,v[2], false, false ) guiGridListSetItemText ( gridlist, row, 3,v[1], false, false ) end end ) 1 Link to comment
L3yr Posted November 8, 2017 Author Share Posted November 8, 2017 6 minutes ago, Talis said: local Weapons = { {30 , 2000 } , {31 , 3000 } } gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist, 0.80) addEventHandler ( "onClientResourceStart" , root , function ( ) for i,v in ipairs (Weapons) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getWeaponNameFromID (v[1]), false, false ) guiGridListSetItemText ( gridlist, row, 2,v[2], false, false ) guiGridListSetItemText ( gridlist, row, 3,v[1], false, false ) end end ) شكرا اخى 1 Link to comment
H25 Posted November 8, 2017 Share Posted November 8, 2017 1 hour ago, iMr.WiFi..! said: مافرقت أخوي ,لانه حطه بفنكشن ومسويه بحدث عند تشغيل المود : ) جرب كذا : local Weapons = { { 'AK - 47' , 30 , 2000 } , { 'M4 ' , 31 , 2000 } } --______________________________________________________________________________________________ local gridlist for _,i in ipairs ( Weapons ) do local row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList,row,1,getWeaponNameFromID(i[1]),false,false) end --______________________________________________________________________________________________ function aa() gridlist = guiCreateGridList(267, 342, 209, 329, false) guiGridListAddColumn(gridlist, "Name", 0.3) guiGridListAddColumn(gridlist, "price", 0.3) guiGridListAddColumn(gridlist, "ID", 0.3) guiSetAlpha(gridlist1, 0.80) guiSetVisible(gridlist,false) end addEventHandler ( "onClientResourceStart", root, aa ) تفرق قراءة الاكواد تبدأ من البداية وخصوصاً انه مو مقيدهم بفكشن Link to comment
iMr.WiFi..! Posted November 8, 2017 Share Posted November 8, 2017 19 minutes ago, Husain-[25]~ said: تفرق قراءة الاكواد تبدأ من البداية وخصوصاً انه مو مقيدهم بفكشن كان مقيدهم بفنكشن بالفعل واي شيء ينضاف في حدث "onClientResourceStart" يتم قرائته قبل الاكواد الباقية Link to comment
H25 Posted November 8, 2017 Share Posted November 8, 2017 6 minutes ago, iMr.WiFi..! said: كان مقيدهم بفنكشن بالفعل واي شيء ينضاف في حدث "onClientResourceStart"يتم قرائته قبل الاكواد الباقية اقصد اكواد الاضافة للقريد لست مو مقيدين بفنكشن وبالنسبة للحدث روح تأكد بنفسك .. اذا فيه اكواد قبله مو مقيدين بفنكشن يشتغلون قبله لان مثل ماقلت لك قراءة الاكواد تبدأ من البداية وشي طبيعي ان الاكواد الي في الحدث بتشتغل قبل كل ((الاحداث فقط Link to comment
iMr.WiFi..! Posted November 8, 2017 Share Posted November 8, 2017 2 minutes ago, Husain-[25]~ said: اقصد اكواد الاضافة للقريد لست مو مقيدين بفنكشن وبالنسبة للحدث روح تأكد بنفسك .. اذا فيه اكواد قبله مو مقيدين بفنكشن يشتغلون قبله لان مثل ماقلت لك قراءة الاكواد تبدأ من البداية وشي طبيعي ان الاكواد الي في الحدث بتشتغل قبل كل ((الاحداث فقط عشان ما نكثر كلام , الكود اشتغل معه تمام أي كلامي صحيح وان ماعجبك النظام اشتكي للعبة Link to comment
H25 Posted November 8, 2017 Share Posted November 8, 2017 2 minutes ago, iMr.WiFi..! said: عشان ما نكثر كلام , الكود اشتغل معه تمام أي كلامي صحيح وان ماعجبك النظام اشتكي للعبة هههههههه !! طيب ليش غيرت وخليت اكواد الاضافة تحت ؟ + هذا شي في لغة البرمجة نفسها ماتقدر تغيره اللعبة مالها علاقة بهذا الشي ! وفي النهاية ترا ماتحديتك عشان تثبت صحة كلامي انا شفت عندك خطأ في المفهوم وحبيت اعلمك .. واذا مو عاجبنك روح حاول تسويه مثل ماتبي 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