1REDBULL Posted April 12, 2014 Share Posted April 12, 2014 السلام ابي الكود الي يعطي سياره Link to comment
ahmed1010 Posted April 12, 2014 Share Posted April 12, 2014 يا اخى دور ما اكثر هذه الاكواد #event OnMarkerHit createMarker getVehicle Link to comment
shwaeki Posted April 12, 2014 Share Posted April 12, 2014 createVehicle ---- صنع سيارة Link to comment
ΞĪŚŚÀ Posted April 12, 2014 Share Posted April 12, 2014 createVehicle - - انشاء سيارة ------------------------------------------------------ اذا تبيه بـماركر createMarker - - انشاء ماركر 'onMarkerHit' - - Event ------------------------------------------------------ اذا تبيه بكلمة addCommandHandler ------------------------------------------------------ اذا تبي بزر 'onClientGUIClick' - - Event Link to comment
#DRAGON!FIRE Posted April 12, 2014 Share Posted April 12, 2014 تقصد يعطيكـ سيارة متى ؟ .. يوم تضغط زر ولأ بـ امر من الكونسل الخ .. ؟ Link to comment
1REDBULL Posted April 12, 2014 Author Share Posted April 12, 2014 تقصد يعطيكـ سيارة متى ؟ .. يوم تضغط زر ولأ بـ امر من الكونسل الخ .. ؟ لا بزر Link to comment
#DRAGON!FIRE Posted April 12, 2014 Share Posted April 12, 2014 استخدم .. : Event: "onClientGUIClick" isElement destroyElement createVehicle warpPedIntoVehicle Link to comment
al-Kobra Posted April 12, 2014 Share Posted April 12, 2014 استخدم .. :Event: "onClientGUIClick" isElement destroyElement createVehicle warpPedIntoVehicle + table Link to comment
al-Kobra Posted April 12, 2014 Share Posted April 12, 2014 client side : addEventHandler ( "onClientGUIClick", اسم البوتون, function ( ) triggerServerEvent ("giveCar", player) end ) server side : local car = {} addEvent("giveCar", true) addEventHandler ( "giveCar", root, function ( ) if isElement ( car[source] ) then destroyElement ( car[source] ) end car[source] = createVehicle ( id, x, y, z ) warpPedIntoVehicle ( source, car[source] ) end ) Link to comment
فاّرس Posted April 12, 2014 Share Posted April 12, 2014 ^ ناقصك تحذف القيمه من الجدول . , واذا طلع من السيرفر او انفجرت السياره تنسحب . car[source] = nil لأنها بتكون مؤثره لو زادت الداتا على الجدول . Link to comment
™!>VàLéNTiNô<!™ Posted April 13, 2014 Share Posted April 13, 2014 انا فى الجداول ملخبط if isElement ( car[source] ) ممكن شرح والجدول car { } Link to comment
فاّرس Posted April 13, 2014 Share Posted April 13, 2014 (edited) الجدول للسياره ليش نسويه ؟ لأن الكلينت لكل لاعب متغير خاص فيه . مثال , local number = 9 يعني لو خليته عد تنازلي يوم يفتح اللوحه راح يكون للي فتحها فقط مو للكل ! بعكس السيرفر , عشان كذا لازم تسوي جدول سواء ماركر او سيارة ... local car = {} -- جدول فاضي طيب نبي نضيف للجدول قيمه , car[source] = createVehicle ( id, x, y, z ) طيب كذا يكون لكل لاعب سياره . طيب مثلا انت تبي ما يكرر اكثر من سياره بالجدول , تسوي كذا , if isElement ( car[source] ) then -- تتحقق هل السياره موجوده , او لا , اذا كانت موجوده يكمل الشرط اذا لا يوقف . destroyElement ( car[source] ) -- تحذفها car[source] = nil -- نحذف القيمه من الجدول , عشان ما تتكرر , end -- تقفل الشرط --[[ في الشرط من وين جت ؟ car[source] طبعا تلاحظ من المتغير حق السياره الي فوق , car[source] = createVehicle ( id, x, y, z ) ]] * السورس الي في المتغير بيكون على حسب تعريفك للاعب في الكود . Edited April 13, 2014 by Guest Link to comment
abu5lf Posted April 13, 2014 Share Posted April 13, 2014 if isElement ( car[source] ) then -- تتحقق هل السياره موجوده , او لا , اذا كانت موجوده يكمل الشرط اذا لا يوقف . destroyElement ( car[source] ) -- تحذفها end -- تقفل الشرط ^ ناقصك تحذف القيمه من الجدول . , واذا طلع من السيرفر او انفجرت السياره تنسحب .car[source] = nil لأنها بتكون مؤثره لو زادت الداتا على الجدول . P.S. يمكن انت نسيتها او اني ماقريت الرد كله Link to comment
فاّرس Posted April 13, 2014 Share Posted April 13, 2014 ايه فعلا نسيتها , يعطيك العافيه . Link to comment
#DRAGON!FIRE Posted April 13, 2014 Share Posted April 13, 2014 (edited) وليه التريقر ؟ .. والمشوار ذا وعندك غلط حاط player ? ثانيا ما يحتاج سيرفر خلها كلنت وما يحتاج جدول ذذ Edited September 11, 2014 by Guest Link to comment
فاّرس Posted April 13, 2014 Share Posted April 13, 2014 كلينت فقط الي سوى السياره يشوفها . 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