SoMoRay Posted June 14, 2013 Share Posted June 14, 2013 السلام عليكم ورحمة الله وبركاته شباب انا ابي اليوم اتعلم القريد لست الي هو تختار منها اشياء شلون اخليه يختار شخصيات و الخ ... لاني نوب فيها بمعنى الكلمة .!! ذذ و لو ابغي اخلي سيارات في قريد لست بدون اسمائهم الي في العبه مثلا اخلي سطر الايدي مالها او اسمهم بدون ما استخدم getVehicleNameFromID ابيه Car1 565 Car2 343 مثل كذا في القريد لست اتمنى فهمتون طلبي :@ Link to comment
PaiN^ Posted June 14, 2013 Share Posted June 14, 2013 سوي جدول وحط فيه الأيديات اللي تبيها ( columen ) بعدين سوي جريد فيه عمودين id والثاني الآيدي car1 وحط في الأول Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 سوي جدول وحط فيه الأيديات اللي تبيها( columen ) بعدين سوي جريد فيه عمودين id والثاني الآيدي car1 وحط في الأول مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل : -- # Client Side ~ : aCars = { { 'Car [1]',411 }, { 'Vehicle [2]',429 }, } for _,v in ipairs ( aCars ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end addEventHandler('onClientGUIClick',MyButton, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 سوي جدول وحط فيه الأيديات اللي تبيها( columen ) بعدين سوي جريد فيه عمودين id والثاني الآيدي car1 وحط في الأول مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل : -- # Client Side ~ : aCars = { { 'Car [1]',411 }, { 'Vehicle [2]',429 }, } for _,v in ipairs ( aCars ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end addEventHandler('onClientGUIClick',MyButton, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ استفسار ويش فايدة guiGridListGetItemData guiGridListSetItemData Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 سوي جدول وحط فيه الأيديات اللي تبيها( columen ) بعدين سوي جريد فيه عمودين id والثاني الآيدي car1 وحط في الأول مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل : -- # Client Side ~ : aCars = { { 'Car [1]',411 }, { 'Vehicle [2]',429 }, } for _,v in ipairs ( aCars ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end addEventHandler('onClientGUIClick',MyButton, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ استفسار ويش فايدة guiGridListGetItemData guiGridListSetItemData شوف انا وش سويت هنا : aCars = { { 'Car [1]',411 }, { 'Vehicle [2]',429 }, } for _,v in ipairs ( aCars ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end سويت لووب لـ التيبل و استخرجت القيمة الثانية الارقام الايدي حق السيارهــ وسويت لة داتا صح ؟ بـ الرو وألخ هي تحفظ الشيء بـ اللستة بـ معنى اوضح .. و يوم جيت ارسل الترايقر جبت الداتا مثل ماشفت الداتا اللي مختارها [ = اتمنى فهمت ي آخوي .. Link to comment
AHMAD1234 Posted June 14, 2013 Share Posted June 14, 2013 cars = { {579,"car1"}, {400,"car2"}, {404,"car3"}, } for i,v in ipairs (cars) do local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) end ض1 جربه Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 مو هوب شرط كذآ يمدي تسوي داتا بحيث يكون كولمن واآحد مثآل : -- # Client Side ~ : aCars = { { 'Car [1]',411 }, { 'Vehicle [2]',429 }, } for _,v in ipairs ( aCars ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end addEventHandler('onClientGUIClick',MyButton, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) الباقي كملة بـ نفسكـ و لا تحسبة كود كآمل مجرد مثآل فقطط ذذ استفسار ويش فايدة guiGridListGetItemData guiGridListSetItemData شوف انا وش سويت هنا : aCars = { { 'Car [1]',411 }, { 'Vehicle [2]',429 }, } for _,v in ipairs ( aCars ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end سويت لووب لـ التيبل و استخرجت القيمة الثانية الارقام الايدي حق السيارهــ وسويت لة داتا صح ؟ بـ الرو وألخ هي تحفظ الشيء بـ اللستة بـ معنى اوضح .. و يوم جيت ارسل الترايقر جبت الداتا مثل ماشفت الداتا اللي مختارها [ = اتمنى فهمت ي آخوي .. طيب كيف بخليه يسوي سباون للسياره في هذه الحركه Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then local x,y,z = getElementPosition ( client ) if x and y and z and id then createVehicle ( id,x,y,z ) end end end ) لا تعتمد عليه مثآل Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then local x,y,z = getElementPosition ( client ) if x and y and z and id then createVehicle ( id,x,y,z ) end end end ) لا تعتمد عليه مثآل طيب تضبط لين اسويها مثل طريقة الاخ احمد ؟ cars = { {579,"car1"}, {400,"car2"}, {404,"car3"}, } for i,v in ipairs (cars) do local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) end ض1 جربه Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then local x,y,z = getElementPosition ( client ) if x and y and z and id then createVehicle ( id,x,y,z ) end end end ) لا تعتمد عليه مثآل طيب تضبط لين اسويها مثل طريقة الاخ احمد ؟ cars = { {579,"car1"}, {400,"car2"}, {404,"car3"}, } for i,v in ipairs (cars) do local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) end ض1 جربه لا لازم تجيب الكلام حق اللستة انا داتا من التيبل مخفي .. Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then local x,y,z = getElementPosition ( client ) if x and y and z and id then createVehicle ( id,x,y,z ) end end end ) لا تعتمد عليه مثآل طيب تضبط لين اسويها مثل طريقة الاخ احمد ؟ cars = { {579,"car1"}, {400,"car2"}, {404,"car3"}, } for i,v in ipairs (cars) do local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, v[1], false, true) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, v[2], false, true) end ض1 جربه لا لازم تجيب الكلام حق اللستة انا داتا من التيبل مخفي .. استخدم الداتا و بتضبط ؟ Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 كودي اظن يضبط جربة .. احمد لازم تغير الداتا لـ تكست Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 كودي اظن يضبط جربة .. احمد لازم تغير الداتا لـ تكست طيب لو ابي اسوي قريد لست حق شخصيات كيف راح تصير ؟ Link to comment
AHMAD1234 Posted June 14, 2013 Share Posted June 14, 2013 (edited) عادي بس حط ارقام الشخصيات ض1 Edited June 14, 2013 by Guest Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 -- # Client Side ~ : aSkins = { { 'KSA',46 }, { 'BH',0 }, } for _,v in ipairs ( aSkins ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end addEventHandler('onClientGUIClick',MyButton, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then setElementModel ( client,id ) end end ) Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 -- # Client Side ~ : aSkins = { { 'KSA',46 }, { 'BH',0 }, } for _,v in ipairs ( aSkins ) do Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,Row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,Row,Column,v[2] ) end addEventHandler('onClientGUIClick',MyButton, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then triggerServerEvent ( 'Event',localPlayer,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then setElementModel ( client,id ) end end ) ويش فايدة client ضغط عليها او وداني ويكي او مو كاتب شيء Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 : متغير يعني لو ترسل من كلنت لـ سيرفر يكون متعرف تلقائيا ذذ https://forum.multitheftauto.com/viewtopic.php?f=91&t=39678 server only. Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 : متغير يعني لو ترسل من كلنت لـ سيرفر يكون متعرف تلقائيا ذذhttps://forum.multitheftauto.com/viewtopic.php?f=91&t=39678 server only. طيب لو ابغيه اختار شخصية BH يسوي شخصية البيد BH نفس مود 50p مثال : https://community.multitheftauto.com/index.php?p=gallery&s=show&pic=2757 Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 انا عطيتكـ كثير كذا اسوية عنكـ احسن .. حاول تسوية وانا معكـ .. Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 انا عطيتكـ كثير كذا اسوية عنكـ احسن .. حاول تسوية وانا معكـ .. يب انا قصدي ويش استخدم Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 createPed setElementModel و نفس اللي عطيتك ياها قبل شوي بس خله كلنت كل شيء .. Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 createPed setElementModel و نفس اللي عطيتك ياها قبل شوي بس خله كلنت كل شيء .. بخليه سيرفر الي قبل شوي لان انا راح اسويه سباون Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 createPed setElementModel و نفس اللي عطيتك ياها قبل شوي بس خله كلنت كل شيء .. بخليه سيرفر الي قبل شوي لان انا راح اسويه سباون سيرفر يصير عند الكل كلنت Link to comment
SoMoRay Posted June 14, 2013 Author Share Posted June 14, 2013 createPed setElementModel و نفس اللي عطيتك ياها قبل شوي بس خله كلنت كل شيء .. بخليه سيرفر الي قبل شوي لان انا راح اسويه سباون سيرفر يصير عند الكل كلنت لاكن انا سويت سيرفر Team = createTeam ( "No Team's", 255, 0, 0 ) setTeamFriendlyFire ( Team, false ) addEvent('Event',true) addEventHandler('Event',root, function ( id ) if tonumber ( id ) then setElementModel ( client,id ) setCameraTarget(source,source) end end ) Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 function onStart ( ) local s,x = guiGetScreenSize () local sx, sy, sz = getWorldFromScreenPosition ( s/2, x/2, 5 ) ped = createPed ( 0, sx, sy, sz,180 ) setElementFrozen ( ped,true ) setCameraMatrix ( 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316 ) outputChatBox ( '* Welcome At Our Servers Have Fun!',0,255,0 ) end onStart ( ) aSkins = { { 'CJ',0 }, { 'KSA',46 }, { 'Test',1 } } for _,v in ipairs ( aSkins ) do row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList,row,Column,v[1],false,false ) guiGridListSetItemData ( GridList,row,Column,v[2] ) end addEventHandler('onClientGUIClick',GridList, function ( ) if guiGridListGetSelectedItem ( GridList ) ~= -1 then setElementModel ( ped,guiGridListGetItemData ( GridList,guiGridListGetSelectedItem ( GridList ), Column ) ) end end,false ) سويت لك هالكود كملة كلنت بس انت سوي اللستة بـ متغير GridList > ذذ وجربة وشوف 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