^iiEcoo'x_) Posted July 11, 2016 Share Posted July 11, 2016 السلام عليكم سويت ذي بس اكيد كلها غلط RunMarker = createMarker(x, y, z, "arrow", 1.1, 255, 0, 0, 170) addEventHandler ( "onMarkerHit", RunMarker, Run = setElementPosition = { [1] = { x, y, z }; [2] = { x, y, z }; [3] = { x, y, z }; }; setElementDimension(Run,30) setElementFrozen(Run,true) local Run = getPlayerAccount(SaedAmer) if Run and not isGuestAccount(Run) and isObjectInACLGroup("user." .. getAccountName(Run),aclGetGroup('Console')) then ---- منقول للامانة if _mytimer and isTimer(_mytimer) then killTimer(_mytimer) newDuel() end end end ) RunMoney = createMarker(x, y, z, "arrow", 1.1, 255, 0, 0, 170) addEventHandler ( "onMarkerHit", winMoney, RunMoney = math.random("50000","200000") setElementData(resourceRoot,"winMoney",tonumber(RunMoney)) setTimer(checkPlrs,30000,1) end Link to comment
Mhmd.z Posted July 11, 2016 Share Posted July 11, 2016 وضح فكرتك , اكوادك مخربطه , مافي لكل حدث فنكشن ومافي اغلاق للحدث, والفكره مو واضحه وش تبي تسوي بالزبط Link to comment
^iiEcoo'x_) Posted July 11, 2016 Author Share Posted July 11, 2016 اخي خلص رح اسويها ع طريقتي الثانية بس ابي كود ماركر جاهز الي بس تلمسه تنتهي المهمة +++++ ممكن الاكواد حق النقاط مثل او واحد يفوز ياخذ 1 نقطة والنقطة تضهر ب لوحة Link to comment
Mhmd.z Posted July 11, 2016 Share Posted July 11, 2016 "onMarkerHit" -- بس الاعب يلمس الماركر givePlayerMoney -- تعطيه فلوس المهمه destroyElement -- تشيل الماركر setElementData--تعطي نقاط للاعب getElementData-- تجيب نقاط الاعب Link to comment
^iiEcoo'x_) Posted July 11, 2016 Author Share Posted July 11, 2016 بعض المبرمجين يقولون اذا عطيناك اكواد جاهزة م تتعلم الي انتو تقولونه غلط اذا عطي اكواد جاهزة احنا نتعلم ... لانو نشوف الي بالاكواد الجاهزة ونتعلم منها Link to comment
Mhmd.z Posted July 11, 2016 Share Posted July 11, 2016 local theMarker = createMarker(0, 0, 0, "cylinder", 5, 255, 255, 255, 200) addEventHandler("onMarkerHit", theMarker, function(player) local randomMoney = math.random(50000, 70000) givePlayerMoney(player, randomMoney) setElementData(player, "PlayerScoreMission", (getElementData(player, "PlayerScoreMission") or 0) + 1) end ) Link to comment
^iiEcoo'x_) Posted July 11, 2016 Author Share Posted July 11, 2016 هسا ابي اشرحه لك سوينا ماركر عشان بس نلمسه يصير حدث onMarkerHit وسوينا بعدها سوينا فنكشن randomMoney وبعدها سوينا ماث راندوم وسميناه وبعدا نعطي للاعب فلوس من الماث راندوم وبعدها نجيب الداتا حق الاعب بس الشي الي مش فاهمه local ابي شرح مبسط لل شو هاي وليش استخدمناها PlayerScoreMission و or 0) + 1) ويعطيك الف عافية والله م قصرت Link to comment
Mhmd.z Posted July 11, 2016 Share Posted July 11, 2016 هسا ابي اشرحه لك سوينا ماركر عشان بس نلمسه يصير حدث onMarkerHit وسوينا بعدها سوينا فنكشن randomMoney وبعدها سوينا ماث راندوم وسميناه وبعدا نعطي للاعب فلوس من الماث راندوم وبعدها نجيب الداتا حق الاعب بس الشي الي مش فاهمه local ابي شرح مبسط لل شو هاي وليش استخدمناها PlayerScoreMission و or 0) + 1) ويعطيك الف عافية والله م قصرت انت تقول تبي تعطي نقاط للاعب, اعطيته نقاط عن طريق الداتا, لو تبي مثلا تشوف نقاطك ذا مثال: addCommandHandler("getScoreMission", function(player) outputChatBox("You score in mission is: "..getElementData(player, "PlayerScoreMission ", player) end ) Link to comment
^iiEcoo'x_) Posted July 11, 2016 Author Share Posted July 11, 2016 والله انك كفوووووووووو بس ذا المثال مب شايف في فنكشنات كثير Link to comment
#DRAGON!FIRE Posted July 11, 2016 Share Posted July 11, 2016 local theMarker = createMarker(0, 0, 0, "cylinder", 5, 255, 255, 255, 200) addEventHandler ( "onMarkerHit", resourceRoot, function ( player ) if ( source == theMarker ) then if ( getElementType ( player ) == "player" ) then local randomMoney = math.random(50000, 70000) givePlayerMoney ( player, randomMoney ) setElementData ( player, "PlayerScoreMission", (getElementData(player, "PlayerScoreMission") or 0) + 1 ) end end end ) Link to comment
^iiEcoo'x_) Posted July 11, 2016 Author Share Posted July 11, 2016 كذا يصير +++++++++++++++++++= جديد هسا سيوته هسا لو ابي اضيف عليه شخصيات اول م يدخل الماركر كذا يصير ؟ RunMarker = createMarker(x, y, z, "arrow", 1.1, 255, 0, 0, 170) addEventHandler ( "onMarkerHit", RunMarker, Run = setElementPosition = { [1] = { x, y, z }; [2] = { x, y, z }; [3] = { x, y, z }; }; Ped = { { 204 }; }; setElementDimension(Run,30) setElementFrozen(Run,true) local Run = getPlayerAccount(SaedAmer) if Run and not isGuestAccount(Run) and isObjectInACLGroup("user." .. getAccountName(Run),aclGetGroup('Console')) then ---- منقول للامانة if _mytimer and isTimer(_mytimer) then killTimer(_mytimer) newDuel() end end end ) local theMarker = createMarker(0, 0, 0, "cylinder", 5, 255, 255, 255, 200) addEventHandler ( "onMarkerHit", resourceRoot, function ( player ) if ( source == theMarker ) then if ( getElementType ( player ) == "player" ) then local randomMoney = math.random(50000, 70000) givePlayerMoney ( player, randomMoney ) setElementData ( player, "PlayerScoreMission", (getElementData(player, "PlayerScoreMission") or 0) + 1 ) end end end ) addCommandHandler("getScoreMission", function(player) outputChatBox("You score in mission is: "..getElementData(player, "PlayerScoreMission ", player) 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