Jump to content

~=[ مــســاعــدة]=~


Recommended Posts

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 by MrKAREEM
Link to comment

يسحب اتكلم عربي بلظ

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
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
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
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
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
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
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

@ 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...