mouamle Posted September 26, 2014 Posted September 26, 2014 السلام عليكم ابي اسوي مود مثلا أذا واحد كتب بالشات حرب ينتقل لساحة الحرب وش أحتاج + شكرا مقدما Skype : Mouamle1 Telegram : @Mouamle
Mr.SAUD Posted September 26, 2014 Posted September 26, 2014 addEventHandler('onPlayerChat',root, function(msg) if string.find(msg,'حرب') then setElementPosition(localPlayer,x,y,z) end end )
TAPL Posted September 26, 2014 Posted September 26, 2014 addEventHandler('onPlayerChat',root, function(msg) if string.find(msg,'حرب') then setElementPosition(localPlayer,x,y,z) end end ) localPlayer --> source
mouamle Posted September 26, 2014 Author Posted September 26, 2014 addEventHandler('onPlayerChat',root, function(msg) if string.find(msg,'حرب') then setElementPosition(localPlayer,x,y,z) end end ) localPlayer --> source شكرا :* Skype : Mouamle1 Telegram : @Mouamle
mouamle Posted September 26, 2014 Author Posted September 26, 2014 واذا ردت على اكثر من منطقة يعني واحد لساحة الحرب والثاني للمعرض Skype : Mouamle1 Telegram : @Mouamle
فاّرس Posted September 26, 2014 Posted September 26, 2014 تقدر تسويها بطريقه بسيطه ... if string.find(msg,'حرب') then .... elseif string.find(msg,'المعرض') then .... end لأنه راح يبحث في الكلام الي كتبه اللاعب string.find انا من رأيي لا تستخدم بمعنى لو كتب جمله وكتب في الجمله كلمه حرب راح ينقله حتى لو كان ما يقصد انه يروح ... Sha67 سابقاً
Mr.R Posted September 26, 2014 Posted September 26, 2014 هذا طلبكـ ... addEventHandler("onPlayerChat", root, function( msg ) -- حدث عند الكتابه في الشات + وظيفة باسم if string.find( msg,"حرب" ) then -- تحقق انه كتب في الشات حرب setElementPosition( source, x, y, z ) -- x,y,z حط الاحداثيات الي ينتقل لها بدال end -- اند الفنكشن end -- اند الاف ) -- قوس اغلاق الحدث واذا بتسوي اكثر من كلمه اذا كتبها ينتقل لـ مكان معين انصحكـ تستخدم طريقة مختصرهـ وهي elseif <-- @The Best مثل ماقال مثال ... if string.find( msg,"حرب" ) then -- تحقق انه كتب في الشات حرب elseif string.find( msg,"البدايه" ) then -- تحقق انه كتب في الشات البدايه end -- اند الاف elseif استخدم كـ طريقه مختصرهـ if <-- عشان اذا بتحط على كل مكان end <-- بتزيد معها الاند فقط شرح بسيط عشان تعرف تختصر ومايصير الكود هريسه اتمنى اني افدتك وافدت كل القارئين سلام : ) * There is no God but Allah, Mohammed is the Messenger Of Allah
KING-_-HOHO Posted September 26, 2014 Posted September 26, 2014 تقدر تسويها بطريقه بسيطه ... if string.find(msg,'حرب') then .... elseif string.find(msg,'المعرض') then .... end لأنه راح يبحث في الكلام الي كتبه اللاعب string.find انا من رأيي لا تستخدم بمعنى لو كتب جمله وكتب في الجمله كلمه حرب راح ينقله حتى لو كان ما يقصد انه يروح ... find يقدر يستخدم ذآ بدآل addEventHandler("onPlayerChat" , root, function( msg ) -- وظيفة وداخل آلقوسين آرقمنت آلرسآلة if tostring(msg) == "حرب" then -- بدآل آلبحث نحط آذآ كآنت آلرسآلة حرب ينفله مثل مآ قآل ذآ بست setElementPosition( source, x, y, z ) -- x,y,z حط الاحداثيات الي ينتقل لها بدال end -- نهآية آلتحقق end -- نهآية آلوظيفة ) -- قوس إغلآق آلحدث Soon MultiGame 4 in 1 (Drift, War, GangWar, Race) (..96%..) Group SysTem (..43%..) Turf SysTem (..70%..) Jops (..44%..) Vehicle SysTem (..55%..) Level SysTem (..88%..) Jail SysTem (..29%..) Missions (..64%..)
Mr.SAUD Posted September 27, 2014 Posted September 27, 2014 addEventHandler('onPlayerChat',root, function(msg) if string.find(msg,'حرب') then setElementPosition(localPlayer,x,y,z) end end ) localPlayer --> source ما انتبهت , يسلمو
فاّرس Posted September 27, 2014 Posted September 27, 2014 find يقدر يستخدم ذآ بدآل addEventHandler("onPlayerChat" , root, function( msg ) -- وظيفة وداخل آلقوسين آرقمنت آلرسآلة if tostring(msg) == "حرب" then -- بدآل آلبحث نحط آذآ كآنت آلرسآلة حرب ينفله مثل مآ قآل ذآ بست setElementPosition( source, x, y, z ) -- x,y,z حط الاحداثيات الي ينتقل لها بدال end -- نهآية آلتحقق end -- نهآية آلوظيفة ) -- قوس إغلآق آلحدث مالها اي فايده tostring الداله... message: A string representing the message typed into the chat. Sha67 سابقاً
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