3ssol Posted April 9, 2013 Share Posted April 9, 2013 سلام عليكم شباب انا ابي فقط الكونسل لما يدخل السيرفر يجيه البلب ولما يخرج يروح البلب بس ماادري وش الخطااا function onjoin(player) if (getElementType (player) == "player") then local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then Lol = createBlipAttachedTo ( player, 56 ) end end addEventHandler ( "onPlayerJoin", root, onjoin ) function s7b() local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then destroyElement(Lol) end end addEventHandler("onPlayerQuit",root,s7b) شباب اذا فيه خطا قولولي لحد يساعد خخخخخ ابي اصحح خطائي بنفسي ويليت توضحون الخطا وانا بصححه Link to comment
Max+ Posted April 9, 2013 Share Posted April 9, 2013 كونسل مآتوقع تمشي غيرهآ # ل ادمن , + وضح طلبك , Link to comment
3ssol Posted April 9, 2013 Author Share Posted April 9, 2013 طلبي واضح ابي لما يدخل اي واحد معه عضويت الكونسل يجي عليه بل خريطه بلب ولما يخرج يروح البلب من الخريطه + الكوونسل تمشي + هي علي حسب الاسل الي عندك + رجااء الي مايعرف لايرد Link to comment
Max+ Posted April 9, 2013 Share Posted April 9, 2013 function destroyBlipAttachedTo(player) local attachedElements = getAttachedElements(player) if attachedElements then for i, attachedElement in ipairs(attachedElements) do if getElementType(attachedElement) == "blip" then destroyElement(attachedElement) end end end end تعلم , Link to comment
فاّرس Posted April 9, 2013 Share Posted April 9, 2013 سلام عليكمشباب انا ابي فقط الكونسل لما يدخل السيرفر يجيه البلب ولما يخرج يروح البلب بس ماادري وش الخطااا function onjoin(player) if (getElementType (player) == "player") then local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then Lol = createBlipAttachedTo ( player, 56 ) end end addEventHandler ( "onPlayerJoin", root, onjoin ) function s7b() local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then destroyElement(Lol) end end addEventHandler("onPlayerQuit",root,s7b) شباب اذا فيه خطا قولولي لحد يساعد خخخخخ ابي اصحح خطائي بنفسي ويليت توضحون الخطا وانا بصححه عندك end ناقص Link to comment
Max+ Posted April 9, 2013 Share Posted April 9, 2013 وعنده في الايفنت عند خروج الاعب player -- غير معرف في الفنكشن فوق لازم يكون function mmm ( player) ~ addEventHandler('onPlayerJoin', root, function (uPed) if (getElementType(uPed) == 'player') then local accName = (getAccountName(getPlayerAccount(uPed))) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) then Lol = createBlipAttachedTo ( uPed, 56 ) end end end ) addEventHandler('onPlayerQuit', root, function (uPed ) local attachedElements = getAttachedElements(uPed) if attachedElements then for i, attachedElement in ipairs(attachedElements) do if(getElementType(attachedElements) == 'blip') then destroyElement(attachedElements) end end end end ) Link to comment
فاّرس Posted April 9, 2013 Share Posted April 9, 2013 + اتوقع ان player في البلب غير معرف,, لو تسويه على السريال يكون افضل لك ! function createBlipAttached() -- وظيفة حدث عند دخول اي لاعب if(getPlayerSerial(source) == "9D12C226FEC361A22BBD7B8E5EC3FDC2")then -- اذا سيريال اللاعب الداخل السيريال التالي blip = createBlipAttachedTo(source, 0) -- يصنع لهذا "اللاعب" البلب end end addEventHandler("onPlayerJoin", root, createBlipAttached) -- اضافة حدث عند دخول اي لاعب function unAttachBlip() -- وظيفة حدث عند خروج اي لاعب if(getPlayerSerial(source) == "9D12C226FEC361A22BBD7B8E5EC3FDC2")then -- اذا سيريال اللاعب الخارج السيريال التالي destroyElement(blip) -- يحذف لهذا "اللاعب" البلب end end addEventHandler("onPlayerQuit", root, unAttachBlip) -- حدث عن خروج اي لاعب Link to comment
3ssol Posted April 9, 2013 Author Share Posted April 9, 2013 + اتوقع ان player في البلب غير معرف,,لو تسويه على السريال يكون افضل لك ! function createBlipAttached() -- وظيفة حدث عند دخول اي لاعب if(getPlayerSerial(source) == "9D12C226FEC361A22BBD7B8E5EC3FDC2")then -- اذا سيريال اللاعب الداخل السيريال التالي blip = createBlipAttachedTo(source, 0) -- يصنع لهذا "اللاعب" البلب end end addEventHandler("onPlayerJoin", root, createBlipAttached) -- اضافة حدث عند دخول اي لاعب function unAttachBlip() -- وظيفة حدث عند خروج اي لاعب if(getPlayerSerial(source) == "9D12C226FEC361A22BBD7B8E5EC3FDC2")then -- اذا سيريال اللاعب الخارج السيريال التالي destroyElement(blip) -- يحذف لهذا "اللاعب" البلب end end addEventHandler("onPlayerQuit", root, unAttachBlip) -- حدث عن خروج اي لاعب فيه كثار كونسل بجلس اخذ سيريال واحد واحد وكذا مشووار احطها لقروب وخلاص Link to comment
3ssol Posted April 9, 2013 Author Share Posted April 9, 2013 مايطلع شي بس انا كونسل ماتجي العلامه علي بل خريطه Link to comment
==>ҭᾄlᾄl Posted April 9, 2013 Share Posted April 9, 2013 غير "onPlayerJoin" وحطها "onPlayerLogin" Link to comment
iMr.Dawix~# Posted April 9, 2013 Share Posted April 9, 2013 addEventHandler("onPlayerLogin", root, function () if getElementType(source) == "player" then local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) then Lol = createBlipAttachedTo ( source, 56 ) end end end) addEventHandler("onPlayerQuit", root, function () local attachedElements = getAttachedElements(source) if attachedElements then for i, attachedElement in ipairs(attachedElements) do if(getElementType(attachedElements) == 'blip') then destroyElement(attachedElements) end end end end) Link to comment
MR.S3D Posted April 9, 2013 Share Posted April 9, 2013 Server Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root,function ) if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) Link to comment
فاّرس Posted April 9, 2013 Share Posted April 9, 2013 +Max @ Lol = createBlipAttachedTo ( uPed, 56 ) uPed = ?? Link to comment
3ssol Posted April 9, 2013 Author Share Posted April 9, 2013 اهاا الحين عرفت يعني الخطا من onplayerjoin بس المهم الحين لما اخرج من السيرفر البلب ماايروح او بمعني ماينسحب من الخريطه ابيه يختفي لما اخرج Link to comment
PaiN^ Posted April 9, 2013 Share Posted April 9, 2013 destroyElement< onPlayerQuit إستخدم Link to comment
3ssol Posted April 9, 2013 Author Share Posted April 9, 2013 Server Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root,function ) if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) × Link to comment
فاّرس Posted April 9, 2013 Share Posted April 9, 2013 Server Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root,function ) if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root, function () if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) Link to comment
iPrestege Posted April 9, 2013 Share Posted April 9, 2013 S3D كودهـ كان ناسي ( بس ! ذذ Link to comment
Max+ Posted April 9, 2013 Share Posted April 9, 2013 (edited) وذأ شغآل ^^ local playerBlips = {} addEventHandler("onPlayerLogin", getRootElement(), function () local account = getPlayerAccount(source) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if isObjectInACLGroup('user.' .. accountName, aclGetGroup("Console")) then if isElement(playerBlips[source]) then destroyElement(playerBlips[source]) end playerBlips[source] = createBlipAttachedTo ( source, 56 ) end end ) addEventHandler("onPlayerLogout", getRootElement(), function() if isElement(playerBlips[source]) then destroyElement(playerBlips[source]) end playerBlips[source] = nil end ) Edited April 9, 2013 by Guest Link to comment
3ssol Posted April 9, 2013 Author Share Posted April 9, 2013 Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root, function () if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) كفوو ضبطططط بس ي ليت واحد ككفوو يشرحلي ووش فايدة Lol = {} ======= _, acc ======= Lol[source] = nil Link to comment
iPrestege Posted April 9, 2013 Share Posted April 9, 2013 جدول حساب _ ارقمنت بالحدث nil نفي الشيء Link to comment
===|OSAMA|=== Posted April 9, 2013 Share Posted April 9, 2013 Server Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root,function ) if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) Lol = {} addEventHandler( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if isObjectInACLGroup('user.'..accName, aclGetGroup('Console')) and not Lol[source] then Lol[source] = createBlipAttachedTo ( source, 56 ) end end) addEventHandler('onPlayerQuit', root, function () if Lol[source] and isElement(Lol[source]) then destroyElement(Lol[source]) Lol[source] = nil end end) عشان يسحب البليب لما اللاعب يسجل خروجه 'onPlayerLogout' إستخدم . Lol = {} addEventHandler ( 'onPlayerLogin', root, function( _, acc ) local accName = getAccountName( acc ) if ( isObjectInACLGroup('user.' .. accName, aclGetGroup ( 'Console' ) ) ) and ( not Lol[source] ) then Lol[source] = createBlipAttachedTo ( source, 56 ) end end ) addEventHandler ( 'onPlayerLogout', root, function ( ) if ( Lol[source] ) and ( isElement ( Lol[source] ) ) then destroyElement ( Lol[source] ) Lol[source] = nil end end ) addEventHandler ( 'onPlayerQuit', root, function ( ) if ( Lol[source] ) and ( isElement ( Lol[source] ) ) then destroyElement ( Lol[source] ) Lol[source] = nil end end ) 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