Jump to content

طلب فنكشن


Recommended Posts

هل هو الشوب داخل ماركر ؟

وعندي سؤال يا شباب

marker = createMarker(-2411.0390625,-594.90307617188,132.6484375-1,"cylinder",2,255,0,0,255) 

 

function good ()

if isElementWithinMarker(source , marker) then

return destroyElement(marker)

else

end

return false

end

addEventHandler("onClientMarkerHit" , marker , good)

حبيت إذا مر بالماركر , تختفي الماركر وإذا طلع من الماركر , ترجع

, فهل اقدر اني ارجع الماركر بعد امر destroyElement ?

Link to comment

طبعا تقدر وهذي هي الطريقه !

marker = createMarker (-2411,-594.90,132.64-1,"cylinder",2,255,0,0,255) 
      
function good (player) 
if getElementType (player) == "player" then 
destroyElement (marker) 
setTimer (function () create () addEventHandler ("onMarkerHit", marker, good) end, 2500, 1) 
end 
end 
addEventHandler ("onMarkerHit", marker, good) 
      
function create () 
marker = createMarker (-2411,-594.90,132.64-1,"cylinder",2,255,0,0,255) 
end 
Link to comment

سويته لك بطريقه مختلفه جرب

marker = createMarker (x,y,z,"cylinder",2,255,0,0,255) 
function good (player) 
if getElementType (player) == "player" then 
if getElementData (player, "hitTheMarker") == true then 
return  
end 
setElementData (player, "hitTheMarker", true) 
setElementAlpha (marker, 0) 
setTimer (function () setElementAlpha (marker, 200) 
setElementData (player, "hitTheMarker", false) end, 2500, 1) 
end 
end 
addEventHandler ("onMarkerHit", marker, good) 
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...