iMr.G[7]A Posted September 22, 2014 Posted September 22, 2014 السلآم عليكم ورحمة الله وبركآتة اولآ : طالبكم اليوم بـ كود تحويل الزر الى ماركر ؟ ومن الزر الى ماركر ابي الماركر ما يفتح الا لرتبة اسمهأ Kill >>>> اتمنى المساعد’ة مع تمنياتي لكم بالتوفيق
#DRAGON!FIRE Posted September 22, 2014 Posted September 22, 2014 الرجاء التوضيح اكثر كيف الزر الى ماركر ؟
iMr.G[7]A Posted September 22, 2014 Author Posted September 22, 2014 يعني يا حبي ما ابي زر يفتح اللوحه ماركر
#DRAGON!FIRE Posted September 22, 2014 Posted September 22, 2014 Event : "onMarkerHit" getElementType isObjectInACLGroup triggerClientEvent guiSetVisible showCursor
KING-_-HOHO Posted September 22, 2014 Posted September 22, 2014 (edited) Server-Side local x, y, z = 100, 100, 100 -- الاحداثيات local size = 1.5 -- الحجم local r, g, b, a = 255, 0, 0, 255 -- اللون local Marker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- نسوي ماركر function MarkerHit( thePlayer ) if getElementType ( thePlayer ) == "player" then -- نتحقق أن اللي دخل الماركر لاعب local HoHoName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجيب أكاونت اللاعب local AccountG = getPlayerAccount ( thePlayer ) if (AccountG) and not isGuestAccount ( AccountG ) then if isObjectInACLGroup ("user."..HoHoName, aclGetGroup ( "Kill" ) ) then -- Kill نتحقق أن أكاونت اللاعب بقروب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- نسوي تريقر للكلنت نفتح فيه اللوحة end end end end addEventHandler( "onMarkerHit", Marker, MarkerHit ) Client-Side local Wnd = Window -- اسم اللوحة function Show() guiSetVisible (Wnd, true) -- نفتح اللوحة showCursor (true) -- نطلع الماوس end addEvent("ShowPanel", true) addEventHandler("ShowPanel", root, Show) أعتمد على نفسك ثاني مرهـ #تم آلتعديل Edited September 22, 2014 by Guest
#DRAGON!FIRE Posted September 22, 2014 Posted September 22, 2014 @ KING-_-HOHO : مو ضروري تسوي متغير عشان اسم نافذة بمكان واحد بس وعندكـ خطا المفروض تتحقق انه مسجل .
KING-_-HOHO Posted September 22, 2014 Posted September 22, 2014 @ KING-_-HOHO : مو ضروري تسوي متغير عشان اسم نافذة بمكان واحد بسوعندكـ خطا المفروض تتحقق انه مسجل . تم التعديل
#DRAGON!FIRE Posted September 22, 2014 Posted September 22, 2014 تجلب حسابه واسم حسابه قبل لا تتحقق انه مسجل .. سوي التحقق قبل اي شي وبعدين اجلب حسابه واسم حسابه وتحقق لو هو موجود بالقروب .
KING-_-HOHO Posted September 22, 2014 Posted September 22, 2014 تجلب حسابه واسم حسابه قبل لا تتحقق انه مسجل .. سوي التحقق قبل اي شي وبعدين اجلب حسابه واسم حسابه وتحقق لو هو موجود بالقروب . #تــم
#DRAGON!FIRE Posted September 22, 2014 Posted September 22, 2014 كودك يصير كذا .. : local x, y, z = 100, 100, 100 -- الاحداثيات local size = 1.5 -- الحجم local r, g, b, a = 255, 0, 0, 255 -- اللون local Marker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- نسوي ماركر function MarkerHit( thePlayer ) if getElementType ( thePlayer ) == "player" then -- نتحقق أن اللي دخل الماركر لاعب if ( getPlayerAccount ( thePlayer ) ) and not isGuestAccount ( getPlayerAccount ( thePlayer ) ) then local HoHoName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجيب أكاونت اللاعب if isObjectInACLGroup ("user."..HoHoName, aclGetGroup ( "Kill" ) ) then -- Kill نتحقق أن أكاونت اللاعب بقروب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- نسوي تريقر للكلنت نفتح فيه اللوحة end end end end addEventHandler( "onMarkerHit", Marker, MarkerHit )
KING-_-HOHO Posted September 22, 2014 Posted September 22, 2014 كودك يصير كذا .. : local x, y, z = 100, 100, 100 -- الاحداثيات local size = 1.5 -- الحجم local r, g, b, a = 255, 0, 0, 255 -- اللون local Marker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- نسوي ماركر function MarkerHit( thePlayer ) if getElementType ( thePlayer ) == "player" then -- نتحقق أن اللي دخل الماركر لاعب if ( getPlayerAccount ( thePlayer ) ) and not isGuestAccount ( getPlayerAccount ( thePlayer ) ) then local HoHoName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجيب أكاونت اللاعب if isObjectInACLGroup ("user."..HoHoName, aclGetGroup ( "Kill" ) ) then -- Kill نتحقق أن أكاونت اللاعب بقروب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- نسوي تريقر للكلنت نفتح فيه اللوحة end end end end addEventHandler( "onMarkerHit", Marker, MarkerHit ) آيه عدلته كذآ قبل وشكراً على التنبيه
Mr.R Posted September 22, 2014 Posted September 22, 2014 (edited) -- معلومات مالها شغل بالكود r, g, b, a = 255, 0, 0, 255 -- لون الماركر size = 1.5 -- حجم الماركر x, y, z = 100, 100, 100 -- احداثيات الماركر myMarker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- صنع ماركر -- معلومات مالها شغل بالكود -- Server local myMarker = createMarker(x, y, z, "cylinder", size, r, b, g, a) -- صنع ماركر addEventHandler( "onMarkerHit", myMarker, root, function ( theplayer ) -- وظيفة باسم + حدث if getElementType ( thePlayer ) == "player" then -- تحقق ان الي دخل الماركر لاعب local AccountName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجلب اسم حساب الاعب local AccountPlayer = getPlayerAccount ( thePlayer ) -- نجلب اسم حساب الاعب if ( AccountPlayer ) and not isGuestAccount ( AccountPlayer ) then -- نتحقق من حساب الاعب if isObjectInACLGroup ("user."..accName, aclGetGroup ( "هنا اسم الرتبه" ) ) then -- نتحقق من الرتبه triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- هنا ترايقر الى سيرفر اكتب اي شيء end -- اند الفنكشن function end -- اند الف if end -- اند الف if end -- اند الف if ) --- Client local wnd = -- اسم النافذه هنا addEvent("ShowPanel", true) -- نحط الاسم الي كتبناه بالترايقر هنا addEventHandler("ShowPanel", root, ShowPanel) -- مثل الكلام الي فوق ^ function ShowPanel( ) -- وظيفه guiSetVisible (اللوحه اسم هنا, true) -- هنا نحط ترو عشان اذا دخلت الماركر تطلع النافذه showCursor (true) -- هنا نحط ترو عشان مؤئر الماوس يطلع end -- اند الفنكشن function هذا الكود سويته بنفسي اول مره اساعد ف الموقع والحمد الله سويت الكود اي خطأ فيه كلمني ولاهنتوا يعيال على مساعدة الرجال وحاول تعتمد على نفسك على الاقل تسوي الكود حتى لو غلط ويساعدونك هنا انا مبتدئ مثلك والحمد الله عرفت للكود متحمس واذا تبي الكلام العربي الي في الاكواد مايروح ويبقى في المود وشغال بالسيرفر UTF-8 خل الملف NotePad++ بإستخدام برنامج وهو مهم للبرمجه جداً مع السلامه Edited September 24, 2014 by Guest
KING-_-HOHO Posted September 22, 2014 Posted September 22, 2014 -- Server -- معلومات مالها شغل بالكود r, g, b, a = 255, 0, 0, 255 -- لون الماركر size = 1.5 -- حجم الماركر x, y, z = 100, 100, 100 -- احداثيات الماركر myMarker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- صنع ماركر -- معلومات مالها شغل بالكود -- Server local myMarker = createMarker(x, y, z, "cylinder", size, r, b, g, a) -- صنع ماركر addEventHandler( "onMarkerHit", myMarker, theplayer, function ( theplayer ) -- وظيفة باسم + حدث if getElementType ( thePlayer ) == "player" then -- تحقق ان الي دخل الماركر لاعب local AccountName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجلب اسم حساب الاعب local AccountPlayer = getPlayerAccount ( thePlayer ) -- نجلب اسم حساب الاعب if isObjectInACLGroup ("user."..accName, aclGetGroup ( "هنا اسم الرتبه" ) ) then -- نتحقق من الرتبه if (AccountPlayer) and not isGuestAccount ( AccountPlayer ) then -- نتحقق من حساب الاعب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- هنا ترايقر الى سيرفر اكتب اي شيء end -- اند الفنكشن function end -- اند الف if end -- اند الف if end -- اند الف if -- Client local wnd = النافذه اسم هنا addEvent("ShowPanel", true) -- نحط الاسم الي كتبناه بالترايقر هنا addEventHandler("ShowPanel", root, ShowPanel) -- مثل الكلام الي فوق ^ function ( ShowPanel ) -- وظيفه guiSetVisible (اللوحه اسم هنا, true) -- هنا نحط ترو عشان اذا دخلت الماركر تطلع النافذه showCursor (true) -- هنا نحط ترو عشان مؤئر الماوس يطلع end -- اند الفنكشن function هذا الكود سويته بنفسي اول مره اساعد ف الموقع والحمد الله سويت الكود اي خطأ فيه كلمني ولاهنتوا يعيال على مساعدة الرجال وحاول تعتمد على نفسك على الاقل تسوي الكود حتى لو غلط ويساعدونك هنا انا مبتدئ مثلك والحمد الله عرفت للكود متحمس آنت عدمتهآ
Mr.R Posted September 22, 2014 Posted September 22, 2014 -- Server -- معلومات مالها شغل بالكود r, g, b, a = 255, 0, 0, 255 -- لون الماركر size = 1.5 -- حجم الماركر x, y, z = 100, 100, 100 -- احداثيات الماركر myMarker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- صنع ماركر -- معلومات مالها شغل بالكود -- Server local myMarker = createMarker(x, y, z, "cylinder", size, r, b, g, a) -- صنع ماركر addEventHandler( "onMarkerHit", myMarker, theplayer, function ( theplayer ) -- وظيفة باسم + حدث if getElementType ( thePlayer ) == "player" then -- تحقق ان الي دخل الماركر لاعب local AccountName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجلب اسم حساب الاعب local AccountPlayer = getPlayerAccount ( thePlayer ) -- نجلب اسم حساب الاعب if isObjectInACLGroup ("user."..accName, aclGetGroup ( "هنا اسم الرتبه" ) ) then -- نتحقق من الرتبه if (AccountPlayer) and not isGuestAccount ( AccountPlayer ) then -- نتحقق من حساب الاعب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- هنا ترايقر الى سيرفر اكتب اي شيء end -- اند الفنكشن function end -- اند الف if end -- اند الف if end -- اند الف if -- Client local wnd = النافذه اسم هنا addEvent("ShowPanel", true) -- نحط الاسم الي كتبناه بالترايقر هنا addEventHandler("ShowPanel", root, ShowPanel) -- مثل الكلام الي فوق ^ function ( ShowPanel ) -- وظيفه guiSetVisible (اللوحه اسم هنا, true) -- هنا نحط ترو عشان اذا دخلت الماركر تطلع النافذه showCursor (true) -- هنا نحط ترو عشان مؤئر الماوس يطلع end -- اند الفنكشن function هذا الكود سويته بنفسي اول مره اساعد ف الموقع والحمد الله سويت الكود اي خطأ فيه كلمني ولاهنتوا يعيال على مساعدة الرجال وحاول تعتمد على نفسك على الاقل تسوي الكود حتى لو غلط ويساعدونك هنا انا مبتدئ مثلك والحمد الله عرفت للكود متحمس آنت عدمتهآ ؟؟؟؟؟؟؟
KING-_-HOHO Posted September 22, 2014 Posted September 22, 2014 -- Server -- معلومات مالها شغل بالكود r, g, b, a = 255, 0, 0, 255 -- لون الماركر size = 1.5 -- حجم الماركر x, y, z = 100, 100, 100 -- احداثيات الماركر myMarker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- صنع ماركر -- معلومات مالها شغل بالكود -- Server local myMarker = createMarker(x, y, z, "cylinder", size, r, b, g, a) -- صنع ماركر addEventHandler( "onMarkerHit", myMarker, theplayer, function ( theplayer ) -- وظيفة باسم + حدث if getElementType ( thePlayer ) == "player" then -- تحقق ان الي دخل الماركر لاعب local AccountName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجلب اسم حساب الاعب local AccountPlayer = getPlayerAccount ( thePlayer ) -- نجلب اسم حساب الاعب if isObjectInACLGroup ("user."..accName, aclGetGroup ( "هنا اسم الرتبه" ) ) then -- نتحقق من الرتبه if (AccountPlayer) and not isGuestAccount ( AccountPlayer ) then -- نتحقق من حساب الاعب triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- هنا ترايقر الى سيرفر اكتب اي شيء end -- اند الفنكشن function end -- اند الف if end -- اند الف if end -- اند الف if -- Client local wnd = النافذه اسم هنا addEvent("ShowPanel", true) -- نحط الاسم الي كتبناه بالترايقر هنا addEventHandler("ShowPanel", root, ShowPanel) -- مثل الكلام الي فوق ^ function ( ShowPanel ) -- وظيفه guiSetVisible (اللوحه اسم هنا, true) -- هنا نحط ترو عشان اذا دخلت الماركر تطلع النافذه showCursor (true) -- هنا نحط ترو عشان مؤئر الماوس يطلع end -- اند الفنكشن function showPanel ShowPanel آنت معرف الايفنت حق التريقر بـ ShowPanel وليه مآتسمي آلفنكشن بـ ShowPanel غلط تحط بين القوسين + آنت تحققت انه داخل القروب قبل ماتتحقق انه مسجل + ناقص قوس اغلاق onMarkerHit يسير كذآ [quote="Mr.R"][lua]-- Server -- معلومات مالها شغل بالكود r, g, b, a = 255, 0, 0, 255 -- لون الماركر size = 1.5 -- حجم الماركر x, y, z = 100, 100, 100 -- احداثيات الماركر myMarker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- صنع ماركر -- معلومات مالها شغل بالكود -- Server local myMarker = createMarker(x, y, z, "cylinder", size, r, b, g, a) -- صنع ماركر addEventHandler( "onMarkerHit", myMarker, root, function ( theplayer ) -- وظيفة باسم + حدث if getElementType ( thePlayer ) == "player" then -- تحقق ان الي دخل الماركر لاعب local AccountName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجلب اسم حساب الاعب local AccountPlayer = getPlayerAccount ( thePlayer ) -- نجلب اسم حساب الاعب if (AccountPlayer) and not isGuestAccount ( AccountPlayer ) then -- نتحقق من حساب الاعب if isObjectInACLGroup ("user."..accName, aclGetGroup ( "هنا اسم الرتبه" ) ) then -- نتحقق من الرتبه triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- هنا ترايقر الى سيرفر اكتب اي شيء end -- اند الفنكشن function end -- اند الف if end -- اند الف if end -- اند الف if ) -- Client local wnd = النافذه اسم هنا function Panel( ) -- وظيفه guiSetVisible (اللوحه اسم هنا, true) -- هنا نحط ترو عشان اذا دخلت الماركر تطلع النافذه showCursor (true) -- هنا نحط ترو عشان مؤئر الماوس يطلع end -- اند الفنكشن function addEvent("ShowPanel", true) -- نحط الاسم الي كتبناه بالترايقر هنا addEventHandler("ShowPanel", root, Panel) -- مثل الكلام الي فوق ^ [/lua]
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