jakson Posted June 3, 2019 Share Posted June 3, 2019 local ClanBlips = {}setTimer( function () local myClan = getElementData(localPlayer,"Clan") for k,thePlayer in ipairs(getElementsByType("player")) do if ( isElement( thePlayer ) ) and ( thePlayer ~= localPlayer ) then if ( getPlayerTeam( thePlayer ) ) then local theirClan = getElementData(thePlayer,"Clan") if myClan ~= theirClan then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementDimension(localPlayer) ~= getElementDimension(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementInterior(localPlayer) ~= getElementInterior(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementData(localPlayer,"Clan") == "None" or getElementData(localPlayer,"Clan") == "none" then if ( ( ClanBlips[thePlayer] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end if ( myClan == theirClan ) then if not ( ClanBlips[thePlayer] ) then if getElementDimension(localPlayer) == getElementDimension(thePlayer) then if getElementInterior(localPlayer) == getElementInterior(thePlayer) then local x,y,z = getElementPosition(thePlayer) ClanBlips[thePlayer] = exports.customblips:createCustomBlip(x,y, 14, 14, "blip1.png",5000) exports.customblips:setCustomBlipRadarScale(ClanBlips[thePlayer],3) end end else if getElementDimension(localPlayer) == getElementDimension(thePlayer) then local x,y,z = getElementPosition(thePlayer) exports.customblips:setCustomBlipPosition(ClanBlips[thePlayer],x,y) end end end end end end end,1000,0)addEventHandler("onClientPlayerQuit",root, function () if ( ( ClanBlips[source] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[source]) ClanBlips[source] = nil end end) هلا شباب كيفكم في مشكله بتواجهني ابي اسوي ازا كان الكلان None يضمر البلب موجود الفنكشن في الاول لاكن لا يعمل و ما يظهر اخطاء في الدي بج Link to comment
Guest Posted June 3, 2019 Share Posted June 3, 2019 getElementData createBlipAttachedTo -- 0 كوودك ماهب مفهوم ... لانه جاي كانه سطر واحد Link to comment
+Source|> Posted June 3, 2019 Share Posted June 3, 2019 10 hours ago, jakson said: local ClanBlips = {}setTimer( function () local myClan = getElementData(localPlayer,"Clan") for k,thePlayer in ipairs(getElementsByType("player")) do if ( isElement( thePlayer ) ) and ( thePlayer ~= localPlayer ) then if ( getPlayerTeam( thePlayer ) ) then local theirClan = getElementData(thePlayer,"Clan") if myClan ~= theirClan then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementDimension(localPlayer) ~= getElementDimension(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementInterior(localPlayer) ~= getElementInterior(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementData(localPlayer,"Clan") == "None" or getElementData(localPlayer,"Clan") == "none" then if ( ( ClanBlips[thePlayer] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end if ( myClan == theirClan ) then if not ( ClanBlips[thePlayer] ) then if getElementDimension(localPlayer) == getElementDimension(thePlayer) then if getElementInterior(localPlayer) == getElementInterior(thePlayer) then local x,y,z = getElementPosition(thePlayer) ClanBlips[thePlayer] = exports.customblips:createCustomBlip(x,y, 14, 14, "blip1.png",5000) exports.customblips:setCustomBlipRadarScale(ClanBlips[thePlayer],3) end end else if getElementDimension(localPlayer) == getElementDimension(thePlayer) then local x,y,z = getElementPosition(thePlayer) exports.customblips:setCustomBlipPosition(ClanBlips[thePlayer],x,y) end end end end end end end,1000,0)addEventHandler("onClientPlayerQuit",root, function () if ( ( ClanBlips[source] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[source]) ClanBlips[source] = nil end end) هلا شباب كيفكم في مشكله بتواجهني ابي اسوي ازا كان الكلان None يضمر البلب موجود الفنكشن في الاول لاكن لا يعمل و ما يظهر اخطاء في الدي بج جربب هذا local ClanBlips = {} setTimer( function () local myClan = getElementData(localPlayer,"Clan") for k,thePlayer in ipairs(getElementsByType("player")) do if ( isElement( thePlayer ) ) and ( thePlayer ~= localPlayer ) then if ( getPlayerTeam( thePlayer ) ) then local theirClan = getElementData(thePlayer,"Clan") if myClan ~= theirClan then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementDimension(localPlayer) ~= getElementDimension(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementInterior(localPlayer) ~= getElementInterior(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementData(localPlayer,"Clan") == "None" or getElementData(localPlayer,"Clan") == "none" or getElementData(localPlayer,"Clan") == nil then if ( ( ClanBlips[thePlayer] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil ClanBlips = {} end end if ( myClan == theirClan ) then if not ( ClanBlips[thePlayer] ) then if getElementDimension(localPlayer) == getElementDimension(thePlayer) then if getElementInterior(localPlayer) == getElementInterior(thePlayer) then local x,y,z = getElementPosition(thePlayer) ClanBlips[thePlayer] = exports.customblips:createCustomBlip(x,y, 14, 14, "blip1.png",5000) exports.customblips:setCustomBlipRadarScale(ClanBlips[thePlayer],3) end end else if getElementDimension(localPlayer) == getElementDimension(thePlayer) then local x,y,z = getElementPosition(thePlayer) exports.customblips:setCustomBlipPosition(ClanBlips[thePlayer],x,y) end end end end end end end,1000,0) addEventHandler("onClientPlayerQuit",root, function () if ( ( ClanBlips[source] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[source]) ClanBlips[source] = nil end end) Link to comment
jakson Posted June 3, 2019 Author Share Posted June 3, 2019 (edited) 1 hour ago, +Source|> said: جربب هذا local ClanBlips = {} setTimer( function () local myClan = getElementData(localPlayer,"Clan") for k,thePlayer in ipairs(getElementsByType("player")) do if ( isElement( thePlayer ) ) and ( thePlayer ~= localPlayer ) then if ( getPlayerTeam( thePlayer ) ) then local theirClan = getElementData(thePlayer,"Clan") if myClan ~= theirClan then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementDimension(localPlayer) ~= getElementDimension(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementInterior(localPlayer) ~= getElementInterior(thePlayer) then if ( ( ClanBlips[thePlayer] ) ) then if (ClanBlips[thePlayer]) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil end end end if getElementData(localPlayer,"Clan") == "None" or getElementData(localPlayer,"Clan") == "none" or getElementData(localPlayer,"Clan") == nil then if ( ( ClanBlips[thePlayer] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[thePlayer]) ClanBlips[thePlayer] = nil ClanBlips = {} end end if ( myClan == theirClan ) then if not ( ClanBlips[thePlayer] ) then if getElementDimension(localPlayer) == getElementDimension(thePlayer) then if getElementInterior(localPlayer) == getElementInterior(thePlayer) then local x,y,z = getElementPosition(thePlayer) ClanBlips[thePlayer] = exports.customblips:createCustomBlip(x,y, 14, 14, "blip1.png",5000) exports.customblips:setCustomBlipRadarScale(ClanBlips[thePlayer],3) end end else if getElementDimension(localPlayer) == getElementDimension(thePlayer) then local x,y,z = getElementPosition(thePlayer) exports.customblips:setCustomBlipPosition(ClanBlips[thePlayer],x,y) end end end end end end end,1000,0) addEventHandler("onClientPlayerQuit",root, function () if ( ( ClanBlips[source] ) ) then exports.customblips:destroyCustomBlip(ClanBlips[source]) ClanBlips[source] = nil end end) للاسف لسه تظهر العلامه لو الكلان None 4 hours ago, DABL said: getElementData createBlipAttachedTo -- 0 كوودك ماهب مفهوم ... لانه جاي كانه سطر واحد انظر تحت بتلاقي الشخص الكريم مخليه مترتب Edited June 3, 2019 by jakson 1 Link to comment
+Source|> Posted June 4, 2019 Share Posted June 4, 2019 6 hours ago, jakson said: تم حل المشكله.. شكرا لكم بالتوفيق 1 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