Stranger Posted August 25, 2013 Share Posted August 25, 2013 (edited) السلام عليكم يا شباب ابيكم تعدلون لي الكود ذا ابيه اذا واحد طلع الماركر بالكلمه يقدر يخفيها بنفس الكلمه + مايقدر يطلع غير ماركر واحد + اذا واحد لمس الماركر غير الي طلعه يعبي دمه بعد addCommandHandler( "Marker", function (player) x,y,z = getElementPosition(player) marker = createMarker ( x,y,z-1, "cylinder", 1.5, 255, 255, 0, 170 ) if (getElementType(player) == ("player")) then if ( getElementHealth ( player ) >= 100 ) then return end -- My Code end end ) Edited August 25, 2013 by Guest Link to comment
3NAD Posted August 25, 2013 Share Posted August 25, 2013 استخدم الجدول لحفظ الماركر على اللاعب Link to comment
Stranger Posted August 25, 2013 Author Share Posted August 25, 2013 كذا ؟ Markers = { } addCommandHandler( "Marker", function (player) x,y,z = getElementPosition(player) Markers = createMarker ( x,y,z-1, "cylinder", 1.5, 255, 255, 0, 170 ) if (getElementType(player) == ("player")) then if ( getElementHealth ( player ) >= 100 ) then return end -- My Code end end ) ابيه اذا واحد طلع الماركر بالكلمه يقدر يخفيها بنفس الكلمه + مايقدر يطلع غير ماركر واحد + اذا واحد لمس الماركر غير الي طلعه يعبي دمه بعد Link to comment
jafar Posted August 25, 2013 Share Posted August 25, 2013 جرب , Markers = { } addCommandHandler( "Marker", function (player) local x,y,z = getElementPosition(player) Markers[player] = createMarker ( x,y,z-1, "cylinder", 1.5, 255, 255, 0, 170 ) if (getElementType(player) == ("player")) then if ( getElementHealth ( player ) >= 100 ) then return end if Markers[player] then -- My Code else destroyElement( Markers[player] ) end end end ) Link to comment
Stranger Posted August 25, 2013 Author Share Posted August 25, 2013 جرب , Markers = { } addCommandHandler( "Marker", function (player) local x,y,z = getElementPosition(player) Markers[player] = createMarker ( x,y,z-1, "cylinder", 1.5, 255, 255, 0, 170 ) if (getElementType(player) == ("player")) then if ( getElementHealth ( player ) >= 100 ) then return end if Markers[player] then -- My Code else destroyElement( Markers[player] ) end end end ) الماركر ما يطلع !! ابيه اذا كتب الكلمه مره ثانيه يختفي الماركر Link to comment
./BlackBird# Posted August 25, 2013 Share Posted August 25, 2013 Markers = { } addCommandHandler( "Marker", function (player) local x,y,z = getElementPosition(player) if not Markers[player] then Markers[player] = createMarker ( x,y,z-1, "cylinder", 1.5, 255, 255, 0, 170 ) if ( getElementHealth ( player ) >= 100 ) then return end -- My Code else destroyElement( Markers[player] ) end end end ) Link to comment
|Mr|-Talal07-| Posted August 25, 2013 Share Posted August 25, 2013 local Marker = {} addCommandHandler("Marker", function (player) local x,y,z = getElementPosition(player) if isElement(Marker[player]) then destroyElement(Marker[player]) end Marker[player] = createMarker(x,y,z-1,"cylinder",1.5,0,255,0) outputChatBox("DONE",player) end ) addEventHandler("onMarkerHit",resourceRoot, function (element) if getElementType(element) == "player" then if getElementHealth(element) <= 99 then setElementHealth(element,100) outputChatBox("DONE",element) end end end ) addEventHandler("onPlayerQuit",root, function () if isElement(Marker[source]) then destroyElement(Marker[source]) Marker[source] = nil end end ) Link to comment
Stranger Posted August 25, 2013 Author Share Posted August 25, 2013 local Marker = {} addCommandHandler("Marker", function (player) local x,y,z = getElementPosition(player) if isElement(Marker[player]) then destroyElement(Marker[player]) end Marker[player] = createMarker(x,y,z-1,"cylinder",1.5,0,255,0) outputChatBox("DONE",player) end ) addEventHandler("onMarkerHit",resourceRoot, function (element) if getElementType(element) == "player" then if getElementHealth(element) <= 99 then setElementHealth(element,100) outputChatBox("DONE",element) end end end ) addEventHandler("onPlayerQuit",root, function () if isElement(Marker[source]) then destroyElement(Marker[source]) Marker[source] = nil end end ) مشكوور لبى قلبك بس فيه مشكله اذا كتبت نفس الكلمه يجيني ماركر والماركر الاول يختفي ابيه اذا كتب الكلمه يجيه ماركر واذا كتبها مره ثانيه يختفي الماركر Link to comment
кιηg-αвα∂у Posted August 25, 2013 Share Posted August 25, 2013 local Marker = {} addCommandHandler("Marker", function (player) local x,y,z = getElementPosition(player) if isElement(Marker[player]) then destroyElement(Marker[player]) end Marker[player] = createMarker(x,y,z-1,"cylinder",1.5,0,255,0) outputChatBox("DONE",player) end ) addEventHandler("onMarkerHit",resourceRoot, function (element) if getElementType(element) == "player" then if getElementHealth(element) <= 99 then setElementHealth(element,100) outputChatBox("DONE",element) end end end ) addEventHandler("onPlayerQuit",root, function () if isElement(Marker[source]) then destroyElement(Marker[source]) Marker[source] = nil end end ) مشكوور لبى قلبك بس فيه مشكله اذا كتبت نفس الكلمه يجيني ماركر والماركر الاول يختفي ابيه اذا كتب الكلمه يجيه ماركر واذا كتبها مره ثانيه يختفي الماركر صاحب الماركر مايقدر ياخذ صحة اذا غيره يقدر local Marker = {} addCommandHandler("Marker", function (player) local x,y,z = getElementPosition(player) if isElement(Marker[player]) then destroyElement(Marker[player]) Marker[player] = nil return end Marker[player] = createMarker(x,y,z-1,"cylinder",1.5,0,255,0) outputChatBox("DONE",player) setElementData(Marker[player],'owner',player) end ) addEventHandler("onMarkerHit",resourceRoot, function (element) if getElementType(element) == "player" then if ( getElementData(source,'owner') == element ) then return end if getElementHealth(element) <= 99 then setElementHealth(element,100) outputChatBox("DONE",element) end end end ) addEventHandler("onPlayerQuit",root, function () if isElement(Marker[source]) then destroyElement(Marker[source]) Marker[source] = nil end end ) Link to comment
فاّرس Posted August 26, 2013 Share Posted August 26, 2013 مشكوور لبى قلبك بس فيه مشكله اذا كتبت نفس الكلمه يجيني ماركر والماركر الاول يختفي ابيه اذا كتب الكلمه يجيه ماركر واذا كتبها مره ثانيه يختفي الماركر تبي اذا كتب الامر يعطيه ماركر واذا كتبه مره ثانيه يختفي , طيب تبي يقدر يرجعه ولا خلاص؟ 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