~Mr.Hassan Posted August 6, 2015 Posted August 6, 2015 السلام عليكم شباب ابي تقولي كيف مثال ذا الفنكشن setVehiclePlateText اول ما لاعب يضغط عليه يطلحله تيكست هو يكتب الكلمه الي يبيها ليظهرها على نمره الي لسيارته كيف اعملها ممكن تساعدوني
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 وضح أكثر ما فهمت قصدك ! ذذ تبيه يضغط ع آيش عشان يحط التكست ؟
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 مثال انا حاطط تيكست وبوتون انت تعرف نمره الي لسياره ابيه لما يحط كلمه بتيكست ويضغط على البوتون تتغير نمره السياره الي هو فيها ابيه هو يكتب النمره لي يبيها
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 آهآ ! ذذ "onClientGUIClick" guiGetText setVehiclePlateText حآول تسويه !
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 (edited) addEventHandler ( "onClientGUIClick", root, function ( ) local text = guiGetText ( text ) setVehiclePlateText ( Vehicle , text ) end ) Edited August 6, 2015 by Guest
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 addEventHandler ( "onClientGUIClick", root, function ( ) local text = guiGetText ( text ) setVehiclePlateText ( Vehicle , text ) end ) Vehicle = لازم تعرفها لازم تجيب سيارة اللاعب الي راكبها وبعدين تحط التكست وما حددت الزر الي ينضغط ؟ يعني أي المنت جي يضغطه بتصير الوظيفة
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 انت عطيتني الفنكشات وانا معرف اجيب فنكشات ماني بل خبره ذي
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 (edited) @ لم يتم التجربة -- Client Side addEventHandler ("onClientGUIClick",root, function (thePlayer) if ( source == Button ) then local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then local text = guiGetText (Edit) if ( text ~= "" ) then setVehiclePlateText( Vehicle, text ) end end end end ) Edited August 6, 2015 by Guest
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 @ لم يتم التجربة -- Server Side addEventHandler ("onClientGUIClick",root, function (thePlayer) if ( source == Button ) then local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then local text = guiGetText (Edit) if ( text ~= "" ) then setVehiclePlateText( Vehicle, text ) end end end end ) كيف سيرفر وفيه "onClientGUIClick if ( source == Button ) then
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 طلب ثاني معي انا حطات لابل اسمه سياره كذا سياره : ابي اذا كان راكب السياره يكتبله جنب اليبل true اذا مو راكب false ممكن الفنكشات
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 (edited) ذذ خرب الكود Edited August 6, 2015 by Guest
!#NssoR_) Posted August 6, 2015 Posted August 6, 2015 addEvent('dd', true) addEventHandler('dd', root, function () if ( getPedOccupiedVehicle ( localPlayer ) ) then guiSetText ( labelName , 'true' ) else guiSetText ( labelName , 'false' ) end end) استبدل labelName بأسم اللبل الي عندك
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 addEvent('dd', true) addEventHandler('dd', root, function () if ( getPedOccupiedVehicle ( localPlayer ) ) then guiSetText ( labelName , 'true' ) else guiSetText ( labelName , 'false' ) end end) استبدل labelName بأسم اللبل الي عندك ذذ كيف تبي تعمل ترايقر للسيرفر وانت حاطط localPlayer لازم سورس ولا انا غلطان
!#NssoR_) Posted August 6, 2015 Posted August 6, 2015 ياخوي انت الي حاط الكود هذا انا ماحطيته وبعد مانزلت الكود انا انت غيرت ردك وشلت الكود انا ماسويت ترايقر ولا شي انت الي مسويحط اكوادك الكلنت كامله واحنا نسويها لك
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 -- @ Professional -- ماله داعي تسوي ترايقر getVehicleController -- سوي تحقق أنه راكب سيارة guiSetText -- حط تكست للبل الي هو "true" وأعكس التحقق وحط "false"
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 بس كيف كلنت مع سيرؤفر ضض -- وين السيرفر هنا ؟ getVehicleController -- سيرفر و كلنت guiSetText -- كلنت
~Mr.Hassan Posted August 6, 2015 Author Posted August 6, 2015 بس كيف كلنت مع سيرؤفر ضض -- وين السيرفر هنا ؟ getVehicleController -- سيرفر و كلنت guiSetText -- كلنت addEventHandler ( "onClientGUIClick", root, function () if ( getPedOccupiedVehicle ( localPlayer ) ) then guiSetText ( labelName , 'true' ) else guiSetText ( labelName , 'false' ) end end) اقدر اخليه كذا ؟
Simple. Posted August 6, 2015 Posted August 6, 2015 استخدم تايمر عشان كل شوي يتحقق انه راكب بسياره او لا
iMr.SFA7 Posted August 6, 2015 Posted August 6, 2015 @ xClassiCx هو مسوي زر والوظيفة تتحقق انه راكب سيارة او لا عند الضغط ع الزر فما يحتاج يسوي تايمر @ Professional ما حددت الزر الي ينضغط ؟ يعني أي المنت جي يضغطه بتصير الوظيفة
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