khaledmhammed Posted August 18, 2015 Share Posted August 18, 2015 هلا شباب كيفككم هذا كود منطقه محمية ماتقدر تطلع سلاح او تقتل .. اعطاني اياه سفاح بموضوع سابق بس لو انا خارج المحمميه ورميت على واحد داخل المحميه يموت مفروض مايتاثر لنه داخل المحميه local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) شوفو حل ربي يجزاكم خير Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 "onClientPlayerDamage" cancelEvent حطه مع ايفينت دخول المنطقة Link to comment
MR.GRAND Posted August 18, 2015 Share Posted August 18, 2015 أنصحك تحمل : https://community.multitheftauto.com/in ... ils&id=761 ولو تبي تعدل على المنطقة وحجمها greenzone.map x , y , SizeX , SizeY Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 أنصحك تحمل :https://community.multitheftauto.com/in ... ils&id=761 ولو تبي تعدل على المنطقة وحجمها greenzone.map x , y , SizeX , SizeY حملته قبل وفيه اكواد كثيره وانا مابي غير كود بسيط سفاح local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onClientPlayerDamage", SafeZone3, SafeZoneA ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) Link to comment
!#NssoR_) Posted August 18, 2015 Share Posted August 18, 2015 حط هذا بالكلنت وخليه نفس احداثيات createColRectangle الـ الي في ملف السيرفر local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 مازبط معي أطرح كودك بعد التعديل . Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) local SafeZone2 = createColRectangle ( 1577.66418, 1723.38440,65,150)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone2)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone2, LeaveA ) local SafeZone1 = createColRectangle ( -2740.70898, 578.36127,144,120)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone1)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone1, LeaveA ) local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) local SafeZone2 = createColRectangle ( 1577.66418, 1723.38440,65,150) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone2) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) local SafeZone1 = createColRectangle ( -2740.70898, 578.36127,144,120) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone1) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 -- Server Side local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) local SafeZone2 = createColRectangle ( 1577.66418, 1723.38440,65,150)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone2)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage2 ( ) if ( isElementWithinColShape(localPlayer, SafeZone2) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage2 ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone2, LeaveA ) local SafeZone1 = createColRectangle ( -2740.70898, 578.36127,144,120)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone1)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage1 ( ) if ( isElementWithinColShape(localPlayer, SafeZone1) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage1 ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone1, LeaveA ) Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 ماضبط لو انا برا المحميه اقدر اموت اللي دخل الان ولو طلعت من المحميه ماقدر احرك سلاح Link to comment
MR.GRAND Posted August 18, 2015 Share Posted August 18, 2015 حط هذا بالكلنت وخليه نفس احداثيات createColRectangle الـ الي في ملف السيرفر local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) انت قلت في ملف السيرفر طيب ليش حاط localPlayer , getLocalPlayer ?? وليش محد انتبه لها Link to comment
MR.GRAND Posted August 18, 2015 Share Posted August 18, 2015 جرب : -- Server Side local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage ( ) if ( isElementWithinColShape(source, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, StopDamage ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 -- Server Side local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) local SafeZone2 = createColRectangle ( 1577.66418, 1723.38440,65,150)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone2)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage2 ( ) if ( isElementWithinColShape(localPlayer, SafeZone2) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage2 ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone2, LeaveA ) local SafeZone1 = createColRectangle ( -2740.70898, 578.36127,144,120)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone1)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage1 ( ) if ( isElementWithinColShape(localPlayer, SafeZone1) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage1 ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone1, LeaveA ) ضبط بس لو اطلع من المحميه ماقدر اغير سلاح يعلق Link to comment
MR.GRAND Posted August 18, 2015 Share Posted August 18, 2015 -- Server Side local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end local SafeZone2 = createColRectangle ( 1577.66418, 1723.38440,65,150)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone2)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage2 ( ) if ( isElementWithinColShape(localPlayer, SafeZone2) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage2 ) local SafeZone1 = createColRectangle ( -2740.70898, 578.36127,144,120)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone1)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage1 ( ) if ( isElementWithinColShape(localPlayer, SafeZone1) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage1 ) addEventHandler ( "onColShapeLeave", SafeZone1, LeaveA ) addEventHandler ( "onColShapeLeave", SafeZone2, LeaveA ) addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 جرب : -- Server Side local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100)-- بدل الاحداثيات هنا --[[ x = الاحداثي x y = الاحداثي y w = الطول h = العرض --]] function SafeZoneA(thePlayer) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) toggleControl ( thePlayer, "aim_weapon", false ) end end end addEventHandler ( "onColShapeHit", getRootElement(), SafeZoneA ) addEventHandler( "onPlayerJoin", SafeZone3, SafeZoneA ) function StopDamage ( ) if ( isElementWithinColShape(source, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", root, StopDamage ) function LeaveA ( thePlayer ) if isElement( thePlayer ) and getElementType ( thePlayer ) == "player" then if (not isElementWithinColShape(thePlayer, SafeZone3)) then toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) end end end addEventHandler ( "onColShapeLeave", SafeZone3, LeaveA ) هذا الحين لا طلعت من المحميه اقدر اغير السلاح مشكور لول مشكور سفاح بس اخر طلب بسيط الحين لو معي رشاش ودخلت المحميه يبقى الرشاش بيدي بس ماقدر ارمي ولا شي مفروض يتغير تبقى بقس Link to comment
!#NssoR_) Posted August 18, 2015 Share Posted August 18, 2015 (edited) حط هذا بالكلنت وخليه نفس احداثيات createColRectangle الـ الي في ملف السيرفر local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) انت قلت في ملف السيرفر طيب ليش حاط localPlayer , getLocalPlayer ?? وليش محد انتبه لها من وين تقرا انت ؟؟ انا قصدي ياخذ الاحداثيات الموجوده في ملف السيرفر ويسوي ملف كلنت ويحط الكود الي عطيته Edited August 18, 2015 by Guest Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 حط هذا بالكلنت وخليه نفس احداثيات createColRectangle الـ الي في ملف السيرفر local SafeZone3 = createColRectangle ( 1150.05579, -1390.17407,70,100) function StopDamage ( ) if ( isElementWithinColShape(localPlayer, SafeZone3) ) then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), StopDamage ) انت قلت في ملف السيرفر طيب ليش حاط localPlayer , getLocalPlayer ?? وليش محد انتبه لها من وين تقرا انت ؟؟ انا قصدي ياخذ الاحداثيات الموجوده في ملف السيرفر ويسوي ملف كلنت ويحط الكود الي عطيته مشككور نصورفعلا لا شلت كودك الكلنت تخرب المحميه لا رجعته تضبط يكون ماقدر اقتل المهم المحميه ضبط سوال ثاني وش المشكله هنا addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[8] ) then guiBringToFront ( ra1, false) guiSetVisible ( ra1, true ) elseif ( source == xzz ) then guiSetVisible ( ra1, false ) showCursor ( true ) elseif ( source == rss1 ) then triggerServerEvent ( "rss", localPlayer ) end end ) مسوي استقبال بالسيرفر ومافي اخطاء بالديبوق Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 مشكلتك ان الماوس يكون ظاهر لاقفل اللوحة ؟ addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[8] ) then guiBringToFront ( ra1, false) guiSetVisible ( ra1, true ) showCursor ( true ) elseif ( source == xzz ) then guiSetVisible ( ra1, false ) showCursor ( false) elseif ( source == rss1 ) then triggerServerEvent ( "rss", localPlayer ) end end ) Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 مشكلتك ان الماوس يكون ظاهر لاقفل اللوحة ؟ addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[8] ) then guiBringToFront ( ra1, false) guiSetVisible ( ra1, true ) showCursor ( true ) elseif ( source == xzz ) then guiSetVisible ( ra1, false ) showCursor ( false) elseif ( source == rss1 ) then triggerServerEvent ( "rss", localPlayer ) end end ) لا المشكله مو من اللوحه واحد ساعدني سويت ترايقر لا ضغط الزر يجي ترايقر لسيرفر بس ماضبط addEvent ( "rss", true ) addEventHandler ( "rss", root, function ( ) function FineSystem (source) local stars = getPlayerWantedLevel(source) local money = getPlayerMoney(source) if stars == 1 and money > 2000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 2000) end if stars == 2 and money > 5000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 5000) end if stars == 3 and money > 10000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 10000) end if stars == 4 and money > 15000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 15000) end if stars == 5 and money > 20000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 20000) end if stars == 6 and money > 30000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 30000) end end end ) Link to comment
Professional Posted August 18, 2015 Share Posted August 18, 2015 بس سؤال لصاحب الموضوع كيف تجيب احداثيات الارض كيف تحسب الاحداثيات ؟؟ جرب مود وما عرفت استخدمه ممكن تقلي كيف Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 بس سؤال لصاحب الموضوعكيف تجيب احداثيات الارض كيف تحسب الاحداثيات ؟؟ جرب مود وما عرفت استخدمه ممكن تقلي كيف في مود استخدمه يجي لي الاحداث https://forum.multitheftauto.com/viewtopic.php?f ... 25#p647525 والاي ب الكود فوق ماخذها جاهزه Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 (edited) بس سؤال لصاحب الموضوعكيف تجيب احداثيات الارض كيف تحسب الاحداثيات ؟؟ جرب مود وما عرفت استخدمه ممكن تقلي كيف --Client Side addCommandHandler( "GetPos", function ( ) local x, y, z = getElementPosition( localPlayer ) setClipboard( x .. ", " .. y .. ", " .. z ) end ) ليه معرف السورس ؟؟ السورس معرف من حاله addEvent ( "rss", true ) addEventHandler ( "rss", root, function ( ) local stars = getPlayerWantedLevel(source) local money = getPlayerMoney(source) if stars == 1 and money > 2000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 2000) end if stars == 2 and money > 5000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 5000) end if stars == 3 and money > 10000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 10000) end if stars == 4 and money > 15000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 15000) end if stars == 5 and money > 20000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 20000) end if stars == 6 and money > 30000 then setPlayerWantedLevel(source, 0) takePlayerMoney(source, 30000) end end ) Edited August 18, 2015 by Guest Link to comment
khaledmhammed Posted August 18, 2015 Author Share Posted August 18, 2015 بس سؤال لصاحب الموضوعكيف تجيب احداثيات الارض كيف تحسب الاحداثيات ؟؟ جرب مود وما عرفت استخدمه ممكن تقلي كيف --Client Side addCommandHandler( "GetPos", function ( ) local x, y, z = getElementPosition( localPlayer ) setClipboard( x .. ", " .. y .. ", " .. z ) end ) سفاح ذا يجيب احداث منطقه كامله صح ولا مو احداث محدد ياليت تساعدني بكودي Link to comment
MR.GRAND Posted August 18, 2015 Share Posted August 18, 2015 بس سؤال لصاحب الموضوعكيف تجيب احداثيات الارض كيف تحسب الاحداثيات ؟؟ جرب مود وما عرفت استخدمه ممكن تقلي كيف --Client Side addCommandHandler( "GetPos", function ( ) local x, y, z = getElementPosition( localPlayer ) setClipboard( x .. ", " .. y .. ", " .. z ) 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