xb0 Posted June 16, 2015 Share Posted June 16, 2015 السلام عليكم عليكم ورحمه الله وبركاته اليوم جيت اسوي ماركر حق مسابقه الي يلمسه يكتب بالشات كلام راح تلاقونه بالكود الي سويته وضفت اتصال لمود ثاني بدال الشات فا كل شي اشتغل الى الاتصال بالمود الثاني guimessages ابي الكلام يطلع بذا المود ابي الكلام يشوفه الكل marker = createMarker ( 1687.0252685547, -2546.1652832031, 13.6, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler("onMarkerHit",marker, function(player) if (getElementType(player) == 'player' ) then setElementHealth (player,0) givePlayerMoney(player,50000) local name = getPlayerName(source) exports["guimessages"]:outputServer (root, "#ffffff.:[" .. name .. "] #139200$$50,000#ffffff:فاز في مسابقة قفزة فيلكس وكسب" , 204, 51, 255) end end) Link to comment
Mr.R Posted June 16, 2015 Share Posted June 16, 2015 (edited) تفضل marker = createMarker ( 1687.0252685547, -2546.1652832031, 13.6, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler ( "onMarkerHit", resourceRoot, function ( player ) if ( source == marker ) then if ( getElementType ( player ) == "player" ) then killPed ( player ) givePlayerMoney ( player, 50000 ) exports["guimessages"]:outputServer ( root, "#ffffff.:[" .. getPlayerName ( player ) .. "] #139200$$50,000#ffffff:فاز في مسابقة قفزة فيلكس وكسب", 204, 51, 255 ) end end end ) وطبعاً انت كنت مستخدم فنكشن زي كذا عشان يموت setElementHealth ( player, 0 ) انا فهمت قصدك وسويته لك بـ فنكشن احسن وهو killPed واذا تبي الماركر يختفي بعد مايدخله وياخذ الفلوس ويموت استخدم فنكشن destroyElement Edited June 22, 2015 by Guest Link to comment
xb0 Posted June 16, 2015 Author Share Posted June 16, 2015 يعطيك العافيه اخوي ماقصرت بس اخر طلب ابغى كود ماركر الي يقرب منه غير الشخصيات الي احددها يموت ويطلع كلام بالشات عشان يفضحه ض1 لاني مركب مود سوبر مان والكل يقدر يستخدم الشخصيه ويوم يقرب من الماركر يموت Link to comment
Simple. Posted June 16, 2015 Share Posted June 16, 2015 onMarkerHit -- Event getElementModel killPed outputChatBox Link to comment
Mr.R Posted June 17, 2015 Share Posted June 17, 2015 (edited) يعطيك العافيه اخوي ماقصرت بس اخر طلب ابغى كود ماركر الي يقرب منه غير الشخصيات الي احددها يموت ويطلع كلام بالشات عشان يفضحه ض1 لاني مركب مود سوبر مان والكل يقدر يستخدم الشخصيه ويوم يقرب من الماركر يموت جرب كذا حسب طلبك هذا addEventHandler ( "onMarkerHit", resourceRoot, function ( ) if ( getElementType ( source ) == "player" ) then if ( getElementModel ( source ) ~= 46 ) then -- هنا حط رقم الشخصيه killPed ( source ) outputChatBox ( "دخل الماركر ومات بشخصيه غير الشخصيه المحدده xD", source, 255, 255, 255, true ) end end end ) Edited June 22, 2015 by Guest Link to comment
</Mr.Tn6eL> Posted June 17, 2015 Share Posted June 17, 2015 This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.Please use killPed instead. Link to comment
Mr.R Posted June 17, 2015 Share Posted June 17, 2015 This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.Please use killPed instead. شكرا ع المعلومه تم التعديل ^^ Link to comment
xb0 Posted June 21, 2015 Author Share Posted June 21, 2015 باك واجهت مشكله باالكود الحين عندي بوابات يوم تقرب منها تصير وضيفه الفوز جربت اغير اسم الماركر ونفس المشكله الحين وش الي اغيره Link to comment
TAPL Posted June 21, 2015 Share Posted June 21, 2015 السلام عليكم عليكم ورحمه الله وبركاته اليوم جيت اسوي ماركر حق مسابقه الي يلمسه يكتب بالشات كلام راح تلاقونه بالكود الي سويته وضفت اتصال لمود ثاني بدال الشات فا كل شي اشتغل الى الاتصال بالمود الثاني guimessages ابي الكلام يطلع بذا المود ابي الكلام يشوفه الكل marker = createMarker ( 1687.0252685547, -2546.1652832031, 13.6, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler("onMarkerHit",marker, function(player) if (getElementType(player) == 'player' ) then setElementHealth (player,0) givePlayerMoney(player,50000) local name = getPlayerName(source) exports["guimessages"]:outputServer (root, "#ffffff.:[" .. name .. "] #139200$$50,000#ffffff:فاز في مسابقة قفزة فيلكس وكسب" , 204, 51, 255) end end) مشكلة كودك في سطر 7 انت حاط سورس و السورس بالحدث ذا هو الماركر، استبدل سورس ب بلاير رابط الحدث ب الروت Mr.R مشكلة كود و التحقق الي مسويه في سطر 4 خطأ if ( marker ) then يفترض كذا: if ( source == marker ) then Link to comment
Mr.R Posted June 22, 2015 Share Posted June 22, 2015 @TAPL شكرا على المعلومه , وتم تعديل الاكواد فوق ياصاحب الموضوع ^ 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