i,xAhmed Posted December 31, 2013 Posted December 31, 2013 آلسلآمم عليكم ورحمة الله وبركاته ي شباب آبي شسمه فنكشنات تكتب بالشات ( موتر ) يجيك موتر
S4MuEL Posted December 31, 2013 Posted December 31, 2013 addEventHandler "onPlayerChat" getElementPosition createVehicle warpPedIntoVehicle
S4MuEL Posted December 31, 2013 Posted December 31, 2013 (edited) ^ + string.find الرد تحت ذذ Edited January 1, 2014 by Guest
jafar Posted December 31, 2013 Posted December 31, 2013 ^ + string.find مآ يحتاج , لأن الحدث onPlayerChat فيه برامتر إسمه msg .. فاهم غلط ,, وظيفة الكود هو يبحث عن الكلمة بشكل دقيق مثلا لو استخدمت الكود بدون string.find واللاعب كتب " ابي موتر " ما راح يجيه لكن اذا كتب " موتر " راح يجيه ف اذا استعملها وكتب " ابي موتر " راح يجيه الموتر ^
S4MuEL Posted January 1, 2014 Posted January 1, 2014 فاهم غلط ,, وظيفة الكود هو يبحث عن الكلمة بشكل دقيق مثلا لو استخدمت الكود بدون string.find واللاعب كتب " ابي موتر " ما راح يجيه لكن اذا كتب " موتر " راح يجيه ف اذا استعملها وكتب " ابي موتر " راح يجيه الموتر ^ إدري عن وظيفتها .. لكن الأخ صاحب الموضوع قال إذا كتبت بالتحديد " موتر " تجيني السياره يعني ما قال ودهـ إذا كتب ابي موتر يجيني موتر بعد ذذ يعني بهاته الحاله string.find ما لها داعي ننتظر محاولتك أخي الكريم ^
i,xAhmed Posted January 1, 2014 Author 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 )
./BlackBird# Posted January 1, 2014 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 ) الكود ماله معنى
AboShanab Posted January 1, 2014 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)
#Al-Ha[J]aRii Posted January 1, 2014 Posted January 1, 2014 انصحك تسوي جدول حق مايكرر كلحين يطلع موتر لان كذا راح يعمل تخريب بالسيرفر .
#DRAGON!FIRE Posted January 1, 2014 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 )
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