AhmadHwetat Posted April 29, 2017 Share Posted April 29, 2017 safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone ( hitPlayer ) local Skin = getElementModel ( hitPlayer ) if ( Skin == 217 ) or ( Skin == 287 ) or ( Skin == 233 ) or ( Skin == 233 ) or ( Skin == 217 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else killPed (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone ( hitPlayer ) toggleControl (hitPlayer, "fire", false ) toggleControl (hitPlayer, "aim_weapon", false) toggleControl (hitPlayer, "vehicle_fire", false) end addEventHandler ( "onColShapeHit", safecol, enterZone ) addEventHandler ( "onColShapeLeave", safecol, leaveZone ) المشكله عندي ان الزومبي يرسبن داخل هذي المنطقه يرسبن ويموت سريع ابيه ما يرسبن الا برا المنطقه لاهنتم Link to comment
Dr.Marco Posted April 29, 2017 Share Posted April 29, 2017 انت سوي ريسباون ولا تربطه ب ملف حماية + جرب د وغيره باحداتياتك function superman () cancelEvent () end xCol = createColRectangle (-3548.16528,-3166.0693359375,379.03997802734,500) xRadar = createRadarArea (-3548.16528,-3166.0693359375,379.03997802734,500,0,255,0,255,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then outputChatBox("*( انت الان داخل الحماية )",element,255,0,0,true) toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",root,superman) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then outputChatBox("*( انت الان خارج الحماية )",element,0,255,0,true) toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",root,superman) end end) Link to comment
Abdul KariM Posted April 29, 2017 Share Posted April 29, 2017 @Dr.Marco هريسة احترافية توني ادري ان ايفنت "onPlayerDamge" يتكنسل ويا صاحب الموضوع جرب استخدم destroyElement بدل killPed Link to comment
Dr.Marco Posted April 29, 2017 Share Posted April 29, 2017 Just now, Abdul KariM said: @Dr.Marco هريسة احترافية توني ادري ان ايفنت "onPlayerDamge" يتكنسل ويا صاحب الموضوع جرب استخدم destroyElement بدل killPed كود حقي مجرب . وشغال تمام Link to comment
#BrosS Posted April 29, 2017 Share Posted April 29, 2017 @Dr.Marco وين شغال يقولك مايتكنسل يعني يكذب ؟ Canceling this event has no effect. Link to comment
AhmadHwetat Posted April 30, 2017 Author Share Posted April 30, 2017 On 4/29/2017 at 23:07, Abdul KariM said: @Dr.Marco هريسة احترافية توني ادري ان ايفنت "onPlayerDamge" يتكنسل ويا صاحب الموضوع جرب استخدم destroyElement بدل killPed شكرا سويت المشكله بس انا ابيه ل تيم مو ل سكن شف هذا الكود وش استخدم وانا ابيه اكثر من تيم مب ل تيم واحد اتمنى تساعدني @Abdul KariM safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if ( skin == 287 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else destroyElement (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) if not ( skin == 287 ) then destroyElement (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) Link to comment
F_F Posted April 30, 2017 Share Posted April 30, 2017 safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer,thePlayer) local CT = createTeam ( "Nothing" ) if ( CT ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else destroyElement (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) if CT then toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) if not ( CT ) then destroyElement (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) Link to comment
AhmadHwetat Posted April 30, 2017 Author Share Posted April 30, 2017 On 4/30/2017 at 14:14, F_F said: safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer,thePlayer) local CT = createTeam ( "Nothing" ) if ( CT ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else destroyElement (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) if CT then toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) if not ( CT ) then destroyElement (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) ي اخوي التيم موجود بس بدي ياه يدخل المنطقه ما يموت ولما يطلع ما يموت ولاهنت اكثر من تيم @F_F Link to comment
#BrosS Posted April 30, 2017 Share Posted April 30, 2017 سوي مثل ماقلك عبد الكريم !! :@ Link to comment
AhmadHwetat Posted April 30, 2017 Author Share Posted April 30, 2017 On 4/30/2017 at 14:28, #BrosS said: سوي مثل ماقلك عبد الكريم !! :@ سويت ي هوه و ضبط بس ابي يخليلي ياه ع تيم بدال سكن Link to comment
F_F Posted April 30, 2017 Share Posted April 30, 2017 safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) Table = { "Teamone," "TeamTwo", "TemeThree" } S = function enterZone(hitPlayer,thePlayer) for k , v in iparis ( Table ) do local Teams = getTeamName ( v ) if Teams then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else destroyElement (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) if Teams then toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) if not ( Temas ) then S(); destroyElement (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) Link to comment
AhmadHwetat Posted April 30, 2017 Author Share Posted April 30, 2017 3 hours ago, F_F said: safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) Table = { "Teamone," "TeamTwo", "TemeThree" } S = function enterZone(hitPlayer,thePlayer) for k , v in iparis ( Table ) do local Teams = getTeamName ( v ) if Teams then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else destroyElement (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) if Teams then toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) if not ( Temas ) then S(); destroyElement (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) المنطقه ما عاد تبين ف الخريطه ف المرهه اسف ع دبل بوست بس بعد ما حولت ف الكود ما صار يطلق برا المنطقه صار بس ف داخل وش الحل safecol = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) safeZoneRadar = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 0, 255, 255,200 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone ( hitPlayer ) local Skin = getElementModel ( hitPlayer ) if ( Skin == 217 ) or ( Skin == 287 ) or ( Skin == 233 ) or ( Skin == 233 ) or ( Skin == 217 ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) else destroyElement (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone ( hitPlayer ) toggleControl (hitPlayer, "fire", false ) toggleControl (hitPlayer, "aim_weapon", false) toggleControl (hitPlayer, "vehicle_fire", false) end addEventHandler ( "onColShapeHit", safecol, enterZone ) addEventHandler ( "onColShapeLeave", safecol, leaveZone ) Link to comment
Dr.Marco Posted April 30, 2017 Share Posted April 30, 2017 (edited) شوف اخر اثنين بدلهم يعني addEventHandler ( "onColShapeLeave", safecol, enterZone ) addEventHandler ( "onColShapeHit", safecol, leaveZone ) Edited April 30, 2017 by Dr.Marco Link to comment
Abdul KariM Posted April 30, 2017 Share Posted April 30, 2017 حليت المشكلة ولا باقي ؟ Link to comment
AhmadHwetat Posted April 30, 2017 Author Share Posted April 30, 2017 شكرا حليتها اشكرك انت اهم شيء افدتني 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