Mr.OppS Posted June 6, 2017 Share Posted June 6, 2017 السلام عليكم, مـود سـرقـة الـبـنـك , مشكلة في المود ,, تقدر تسرق بنك 20 مـرة و اكثير !! بعد سرقـة الحـقـيـبـة تذهـب الي العلامـة حتي تأخذ فلوس !هذه العلامة تقدر تدخل بيها 20 مـرة و تأخذ فلوس 20 مـرة addEventHandler("onPlayerWasted", root, function() local missin = getElementData(source, "MiissoinStart") if missin then notrolley = getAttachedElements ( source ) for k,v in pairs(notrolley) do if getElementType ( v ) == "object" then destroyElement ( v ) end end textDisplayRemoveObserver ( RobberDisplay, source ) if dropMarker and dropBlip then destroyElement ( dropMarker ) destroyElement ( dropBlip ) end removeEventHandler("onMarkerHit",dropMarker,onDrop) local x,y,z = getElementPosition ( source ) object_wast = createObject ( 1550, x, y, z ) marker_wast = createMarker ( x, y, z, "cylinder", 3, 0, 0, 0, 0 ) addEventHandler("onMarkerHit", marker_wast,onHiter) setElementData(source, "MiissoinStart", false) end end ) function onHiter(hitter) if ( hitter and getElementType(hitter) == "player" ) then removeEventHandler("onMarkerHit",dropMarker,onDrop) destroyElement ( source ) wasted(hitter,true) end end function Finsh_Missoin(plr) if plr then randomDrop = math.random(#dropPosz) if randomDrop then dropX,dropY,dropZ = dropPosz[randomDrop][1],dropPosz[randomDrop][2],dropPosz[randomDrop][3] x,y,z = getElementPosition(plr) dropMarker = createMarker(dropX,dropY,dropZ,"cylinder",7,255,255,0,100,plr) dropBlip = createBlip(dropX,dropY,dropZ,24,5,255,255,0,255,1,900000,plr) function onDrop( hitter ) if ( hitter == plr ) then removeEventHandler("onMarkerHit",dropMarker,onDrop) missionDone(hitter,true) end end addEventHandler("onMarkerHit",dropMarker,onDrop) end end end function missionDone(Player,Won) if Player then if Won == true then -- If he won the mission dd(Player) cx = math.random(10000,15000) givePlayerMoney ( Player, cx ) setElementData(Player, "MiissoinStart", false) outputChatBox ( "* * * #C0C0C0[ نجحت عملية السرقة بنجاح ] = #FFFF00($"..cx..") * * * ", Player, 255, 255, 255, true ) if isTimer(TimerStart["timer"]) then killTimer(TimerStart["timer"]) end --kill timee if isTimer(TimerStop["timer"]) then killTimer(TimerStop["timer"]) end --kill timee TimerStart["timer"] = setTimer ( start_Roob, robbertime,1) if dropMarker and dropBlip then destroyElement ( dropMarker ) destroyElement ( dropBlip ) end end else ---- end end تـطـلـع هذه الأخـطـاء Bankl\server.lua:240: Bad argument @ 'removeEventHandler' [Expected element at argument 2, got nil] Bankl\server.lua:252: Bad argument @ 'removeEventHandler' [Expected element at argument 2, got nil] Bankl\server.lua:159: Bad argument @ 'destroyElement' [Expected element at argument 1] أمـاكــن الأخطـاء removeEventHandler("onMarkerHit",dropMarker,onDrop) destroyElement ( dropMarker ) destroyElement ( dropBlip ) مساعدة رجاء Link to comment
AE. Posted June 6, 2017 Share Posted June 6, 2017 dropMarker = {} addEventHandler("onPlayerWasted", root, function() local missin = getElementData(source, "MiissoinStart") if missin then notrolley = getAttachedElements ( source ) for k,v in pairs(notrolley) do if getElementType ( v ) == "object" then destroyElement ( v ) end end textDisplayRemoveObserver ( RobberDisplay, source ) if dropMarker and dropBlip then destroyElement ( dropMarker ) destroyElement ( dropBlip ) end removeEventHandler("onMarkerHit",dropMarker,onDrop) local x,y,z = getElementPosition ( source ) object_wast = createObject ( 1550, x, y, z ) marker_wast = createMarker ( x, y, z, "cylinder", 3, 0, 0, 0, 0 ) addEventHandler("onMarkerHit", marker_wast,onHiter) setElementData(source, "MiissoinStart", false) end end ) function onHiter(hitter) if ( hitter and getElementType(hitter) == "player" ) then removeEventHandler("onMarkerHit",dropMarker,onDrop) destroyElement ( source ) wasted(hitter,true) end end function Finsh_Missoin(plr) if plr then randomDrop = math.random(#dropPosz) if randomDrop then dropX,dropY,dropZ = dropPosz[randomDrop][1],dropPosz[randomDrop][2],dropPosz[randomDrop][3] x,y,z = getElementPosition(plr) dropMarker[1] = createMarker(dropX,dropY,dropZ,"cylinder",7,255,255,0,100,plr) dropBlip = createBlip(dropX,dropY,dropZ,24,5,255,255,0,255,1,900000,plr) function onDrop( hitter ) if ( hitter == plr ) then destroyElement ( dropMarker[1] ) destroyElement ( dropBlip ) missionDone(hitter,true) end end addEventHandler("onMarkerHit",dropMarker,onDrop) end end end function missionDone(Player,Won) if Player then if Won == true then -- If he won the mission dd(Player) cx = math.random(10000,15000) givePlayerMoney ( Player, cx ) setElementData(Player, "MiissoinStart", false) outputChatBox ( "* * * #C0C0C0[ نجحت عملية السرقة بنجاح ] = #FFFF00($"..cx..") * * * ", Player, 255, 255, 255, true ) if isTimer(TimerStart["timer"]) then killTimer(TimerStart["timer"]) end --kill timee if isTimer(TimerStop["timer"]) then killTimer(TimerStop["timer"]) end --kill timee TimerStart["timer"] = setTimer ( start_Roob, robbertime,1) if dropMarker and dropBlip then destroyElement ( dropMarker ) destroyElement ( dropBlip ) end end else ---- end 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