i,xAhmed Posted December 31, 2013 Share Posted December 31, 2013 آلسلآمم عليكم ورحمة الله وبركاته ي شباب آبي شسمه فنكشنات تكتب بالشات ( موتر ) يجيك موتر Link to comment
S4MuEL Posted December 31, 2013 Share Posted December 31, 2013 addEventHandler "onPlayerChat" getElementPosition createVehicle warpPedIntoVehicle Link to comment
S4MuEL Posted December 31, 2013 Share Posted December 31, 2013 (edited) ^ + string.find الرد تحت ذذ Edited January 1, 2014 by Guest Link to comment
jafar Posted December 31, 2013 Share Posted December 31, 2013 ^ + string.find مآ يحتاج , لأن الحدث onPlayerChat فيه برامتر إسمه msg .. فاهم غلط ,, وظيفة الكود هو يبحث عن الكلمة بشكل دقيق مثلا لو استخدمت الكود بدون string.find واللاعب كتب " ابي موتر " ما راح يجيه لكن اذا كتب " موتر " راح يجيه ف اذا استعملها وكتب " ابي موتر " راح يجيه الموتر ^ Link to comment
S4MuEL Posted January 1, 2014 Share Posted January 1, 2014 فاهم غلط ,, وظيفة الكود هو يبحث عن الكلمة بشكل دقيق مثلا لو استخدمت الكود بدون string.find واللاعب كتب " ابي موتر " ما راح يجيه لكن اذا كتب " موتر " راح يجيه ف اذا استعملها وكتب " ابي موتر " راح يجيه الموتر ^ إدري عن وظيفتها .. لكن الأخ صاحب الموضوع قال إذا كتبت بالتحديد " موتر " تجيني السياره يعني ما قال ودهـ إذا كتب ابي موتر يجيني موتر بعد ذذ يعني بهاته الحاله string.find ما لها داعي ننتظر محاولتك أخي الكريم ^ Link to comment
i,xAhmed Posted January 1, 2014 Author Share Posted January 1, 2014 صح ؟ function C local x, y, z = getElementPosition ( Car ) createVehicle ( 500, x, y, z + 9 ) outputChatBox ( "تم اخذ موتر", Car ) warpPedIntoVehicle ( Car ) addEventHandler( "onPlayerChat", CCar ) Link to comment
./BlackBird# Posted January 1, 2014 Share Posted January 1, 2014 صح ؟ function C local x, y, z = getElementPosition ( Car ) createVehicle ( 500, x, y, z + 9 ) outputChatBox ( "تم اخذ موتر", Car ) warpPedIntoVehicle ( Car ) addEventHandler( "onPlayerChat", CCar ) الكود ماله معنى Link to comment
AboShanab Posted January 1, 2014 Share Posted January 1, 2014 addEventHandler( "onPlayerChat",root,function ( msg ) if ( msg == "موتر" ) then local x,y,z = getElementPosition ( source ) local xMyCar = createVehicle( 500,x + 3,y,z ) warpPedIntoVehicle ( source, xMyCar ) outputChatBox("Welcome To Your Car !",source,255,255,0,true) end end) Link to comment
#Al-Ha[J]aRii Posted January 1, 2014 Share Posted January 1, 2014 انصحك تسوي جدول حق مايكرر كلحين يطلع موتر لان كذا راح يعمل تخريب بالسيرفر . Link to comment
#DRAGON!FIRE Posted January 1, 2014 Share Posted January 1, 2014 local TableV = {}; local ID = 605 --- أيدي السيارة addEventHandler( "onPlayerChat", root, function ( msg ) if ( msg and msg == "موتر" ) then if isElement(TableV[source]) then destroyElement(TableV[source]) end local x, y, z = getElementPosition ( source ) TableV[source] = createVehicle( ID, x + 3, y, z ) if ( TableV[source] ) then warpPedIntoVehicle ( source, TableV[source] ) outputChatBox("** You Have Get Vehicle .",source,255,255,0,true) end end end ) 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