OmaR|FLaSH Posted October 15, 2018 Share Posted October 15, 2018 لو سمحت يا شباب .. كنت عاوز كود حماية من الدم مثال لو حد في البداية سقط من مكان عالي دمة بينقص عاوز الدم مينقصش :"[] Link to comment
MrKAREEM Posted October 15, 2018 Share Posted October 15, 2018 (edited) Hello Pls In The Coming Check The Section Because you Choose The Error Section IF You Want Arabic Section You Must Choose The Arabic Section And You Want Help In Scripting and Not Tutorials ok The Codes That You Need : ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Collisionshape OnColShapeHit onColShapeLeave OnClientPlayerDamage --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For Make That You Must Make Col Shape And When Player Hit Col Shape He Add That Code To The LocalPlayer OnClientPlayerDamage Example : addEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) or u can setElementData To Player And user OnClientPlayerDamage And IF he get The Data Cancel Event ok When He Leave The Col Shape Use removeEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) Edited October 15, 2018 by MrKAREEM Link to comment
OmaR|FLaSH Posted October 15, 2018 Author Share Posted October 15, 2018 يسحب اتكلم عربي بلظ 52 minutes ago, MrKAREEM said: Hello Pls In The Coming Check The Section Because you Choose The Error Section IF You Want Arabic Section You Must Choose The Arabic Section And You Want Help In Scripting and Not Tutorials ok The Codes That You Need : ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Collisionshape OnColShapeHit onColShapeLeave OnClientPlayerDamage --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- For Make That You Must Make Col Shape And When Player Hit Col Shape He Add That Code To The LocalPlayer OnClientPlayerDamage Example : addEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) or u can setElementData To Player And user OnClientPlayerDamage And IF he get The Data Cancel Event ok When He Leave The Col Shape Use removeEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) بص انا ركبت الحماية للبداية وبرضة الدم بينقص function superman () cancelEvent () end xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",root,superman) addEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",root,superman) removeEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) end end) Link to comment
MrKAREEM Posted October 15, 2018 Share Posted October 15, 2018 1 hour ago, OmaR|FLaSH said: يسحب اتكلم عربي بلظ بص انا ركبت الحماية للبداية وبرضة الدم بينقص function superman () cancelEvent () end xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",root,superman) addEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",root,superman) removeEventHandler("onClientPlayerDamage", localPlayer, cancelEvent) end end) يرجي رؤية السكشن قبل النشر فيه لانك نشرت في القسم الاجنبي شوف اللوكال بلاير هنا معرف ب element فهيبقي كدة function superman () cancelEvent () end xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",root,superman) addEventHandler("onClientPlayerDamage", element, cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",root,superman) removeEventHandler("onClientPlayerDamage", element, cancelEvent) end end) Link to comment
OmaR|FLaSH Posted October 15, 2018 Author Share Posted October 15, 2018 12 minutes ago, MrKAREEM said: يرجي رؤية السكشن قبل النشر فيه لانك نشرت في القسم الاجنبي شوف اللوكال بلاير هنا معرف ب element فهيبقي كدة function superman () cancelEvent () end xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",root,superman) addEventHandler("onClientPlayerDamage", element, cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",root,superman) removeEventHandler("onClientPlayerDamage", element, cancelEvent) end end) اول يوم في المنتدي بقا سوري يسحب ع القسم المهم برضة الدم بينقص .. Link to comment
MrKAREEM Posted October 15, 2018 Share Posted October 15, 2018 11 minutes ago, OmaR|FLaSH said: اول يوم في المنتدي بقا سوري يسحب ع القسم المهم برضة الدم بينقص .. xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",element,cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",element,cancelEvent) end end) جرب Link to comment
OmaR|FLaSH Posted October 15, 2018 Author Share Posted October 15, 2018 11 minutes ago, MrKAREEM said: xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",element,cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",element,cancelEvent) end end) جرب كدا الحماية كلها اتشالت ... :"[] Link to comment
Guest Posted October 15, 2018 Share Posted October 15, 2018 xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) addEventHandler("onPlayerDamage",element,cancelEvent) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) removeEventHandler("onPlayerDamage",element) cancelEvent() end end) Link to comment
Abdul KariM Posted October 15, 2018 Share Posted October 15, 2018 كمية فهاوة فوق غير طبيعية 2 Link to comment
MrKAREEM Posted October 16, 2018 Share Posted October 16, 2018 xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) function onEnter ( thePlayer ) if ( getElementType(thePlayer) == "vehicle" ) then destroyElement(element) elseif getElementType ( thePlayer ) == "player" then toggleControl (thePlayer,"fire",false) toggleControl (thePlayer,"action",false) toggleControl (thePlayer,"aim_weapon",false) addEventHandler("onPlayerDamage",thePlayer,onDamage) end end addEventHandler ( "onColShapeHit", xCol, onEnter ) function onLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then toggleControl (thePlayer,"fire",true) toggleControl (thePlayer,"action",true) toggleControl (thePlayer,"aim_weapon",true) removeEventHandler("onPlayerDamage",thePlayer,onDamage) end end addEventHandler ( "onColShapeLeave", xCol, onLeave ) function onDamage() cancelEvent () end شوف كدة ؟؟ Link to comment
#\_oskar_/# Posted October 16, 2018 Share Posted October 16, 2018 ماينفع تكنسل افنت الدمج بالسيرفر حطه بملف كلنت وسوي ترايقر Link to comment
Ram, Posted October 16, 2018 Share Posted October 16, 2018 @ Server Side :- xCol = createColRectangle (-3655,-3166.0693359375,379.03997802734,300) xRadar = createRadarArea (-3655,-3166.0693359375,379.03997802734,300,255,191,0,200,root) addEventHandler("onColShapeHit",resourceRoot,function (element) if ( getElementType(element) == "vehicle" ) then destroyElement(element) elseif ( getElementType(element) == "player" ) then toggleControl (element,"fire",false) toggleControl (element,"action",false) toggleControl (element,"aim_weapon",false) local value = true triggerClientEvent(element,"SetTheProtectionFromDamage",element,value) end end) addEventHandler("onColShapeLeave",resourceRoot,function (element) if ( getElementType(element) == "player" ) then toggleControl (element,"fire",true) toggleControl (element,"action",true) toggleControl (element,"aim_weapon",true) local value = false triggerClientEvent(element,"SetTheProtectionFromDamage",element,value) end end) @ Client Side :- function setEventOnDamage(value) if ( source == localPlayer ) then if ( value == true ) then addEventHandler("onClientPlayerDamage",source,onClientDamage) elseif ( value == false ) then removeEventHandler("onClientPlayerDamage",source,onClientDamage) end end end addEvent("SetTheProtectionFromDamage",true); addEventHandler("SetTheProtectionFromDamage",root,setEventOnDamage) function onClientDamage() cancelEvent( ) end Try , Link to comment
Abdul KariM Posted October 17, 2018 Share Posted October 17, 2018 ترا مايحتاج كل الي قاعد تسوونه "onClientPlayerDamage" getElementsByType -- الكول شيب isElementWithinColShape cancelEvent Link to comment
Ram, Posted October 17, 2018 Share Posted October 17, 2018 (edited) 8 hours ago, Abdul KariM said: ترا مايحتاج كل الي قاعد تسوونه "onClientPlayerDamage" getElementsByType -- الكول شيب isElementWithinColShape cancelEvent لازم تحط المنت داتاع الكول شيب عشان يتحقق اذا هي البداية ولا لا Edited October 17, 2018 by #Ram Link to comment
Abdul KariM Posted October 17, 2018 Share Posted October 17, 2018 @#Ram لا مايحتاج يسوي لوب بس على الكول شب الموجود في السكربت 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