mohssan Posted October 31, 2012 Share Posted October 31, 2012 السلام عليكم ابغي كود دائرة اذا مر منه الشخص يحصل افلوس اتمنى فهمتون قصدي Link to comment
3NAD Posted October 31, 2012 Share Posted October 31, 2012 createMarker "onMarkerHit" givePlayerMoney Link to comment
mohssan Posted October 31, 2012 Author Share Posted October 31, 2012 createMarker "onMarkerHit" givePlayerMoney ممكن الكود كامل لان انا مبتدى Link to comment
Tete omar Posted October 31, 2012 Share Posted October 31, 2012 createMarker "onMarkerHit" givePlayerMoney ممكن الكود كامل لان انا مبتدى جرب هذا كــمثال addEventHandler("onResourceStart",resourceRoot, -- عند بدء السكربت function() for k,v in ipairs(getElementsByType('player')) do local x, y, z = getElementPosition(v) -- نجيب مكان اللاعب Marker = createMarker(x, y-5, z, "cylinder") -- ونخلي الماركر تتكون في مكان الاعب end addEventHandler("onMarkerHit",Marker,example) -- ونضيف الحدث end ) function example(hitElement) if(getElementType(hitElement)=='player')then -- اذا الامس لاعب givePlayerMoney(hitElement,1000) -- يعطيه فلوس end end لا تنسى تحطه بملف السيرفر عشان لا يجيك اخطاء Link to comment
./BlackBird# Posted October 31, 2012 Share Posted October 31, 2012 marker = createMarker( ... ) function hit(hitElement) if(hitElement=='player')then givePlayerMoney(hitElement,1000) end end addEventHandler("onMarkerHit", marker, hit) Link to comment
Tete omar Posted October 31, 2012 Share Posted October 31, 2012 marker = createMarker( ... ) function hit(hitElement) if(hitElement=='player')then givePlayerMoney(hitElement,1000) end end addEventHandler("onMarkerHit", marker, hit) What ? Link to comment
TAPL Posted October 31, 2012 Share Posted October 31, 2012 marker = createMarker( ... ) function hit(hitElement) if(hitElement=='player')then givePlayerMoney(hitElement,1000) end end addEventHandler("onMarkerHit", marker, hit) marker = createMarker( ... ) function hit(hitElement) if(getElementType(hitElement) == "player")then givePlayerMoney(hitElement,1000) end end addEventHandler("onMarkerHit", marker, hit) 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