#STZ Posted December 10, 2016 Share Posted December 10, 2016 السلام عليكم و رحمة الله وبركاته سويت كود يسوي منطقة ع الخريطة واللي يدخل ما يموت و لا يمديه يدخل بسيارة سويت اذا دخل ياخذ داتا و ما يموت اذا معه لاكن اموت addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), function ( attacker, weapon, bodypart ) if ( attacker and getElementType(attacker) == 'player' and attacker ~= source ) then if ( getElementData(source,'NoKillData') ) then cancelEvent() end end end ) sezi = 30 x,y,z = 267.10522, 1975.09656, 20 Col = createColRectangle (x,y,z,sezi) Radar = createRadarArea (x,y,z,sezi,0,255,0,255,root) addEventHandler("onColShapeHit",Col,function (HitElement) if getElementType(HitElement) == "vehicle" then destroyElement( HitElement ) elseif getElementType(HitElement) == "player" then outputChatBox("Welcome In Safe Zone",HitElement,255,0,0,true) toggleControl (HitElement,"fire",false) toggleControl (HitElement,"aim_weapon",false) setElementData( HitElement , 'NoKillData' , false ) end end) addEventHandler("onColShapeLeave",Col,function (LeaveElement) if getElementType(LeaveElement) == "player" then outputChatBox("Bye",LeaveElement,0,255,0,true) toggleControl (LeaveElement,"fire",true) toggleControl (LeaveElement,"aim_weapon",true) setElementData( LeaveElement , 'NoKillData' , false ) end end) Link to comment
coNolel Posted December 10, 2016 Share Posted December 10, 2016 addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), function ( attacker, weapon, bodypart ) if ( attacker and getElementType(attacker) == 'player' and attacker ~= source ) then if ( getElementData(source,'NoKillData') ) then cancelEvent() end end end ) ? sezi = 30 x,y,z = 267.10522, 1975.09656, 20 Col = createColRectangle (x,y,z,sezi) Radar = createRadarArea (x,y,z,sezi,0,255,0,255,root) addEventHandler("onColShapeHit",Col,function (HitElement) if getElementType(HitElement) == "vehicle" then destroyElement( HitElement ) elseif getElementType(HitElement) == "player" then outputChatBox("Welcome In Safe Zone",HitElement,255,0,0,true) toggleControl (HitElement,"fire",false) toggleControl (HitElement,"aim_weapon",false) setElementData( HitElement , 'NoKillData' , true ) end end) addEventHandler("onColShapeLeave",Col,function (LeaveElement) if getElementType(LeaveElement) == "player" then outputChatBox("Bye",LeaveElement,0,255,0,true) toggleControl (LeaveElement,"fire",true) toggleControl (LeaveElement,"aim_weapon",true) setElementData( LeaveElement , 'NoKillData' , false ) end end) Link to comment
iPrestege Posted December 10, 2016 Share Posted December 10, 2016 sezi = 30; x,y,z = 267.10522,1975.09656,20; Col = createColRectangle ( x,y,z,sezi ); Radar = createRadarArea ( x,y,z,sezi,0,255,0,255,root ); addEventHandler ( 'onColShapeHit',Col, function ( aHit ) aType = getElementType ( aHit ); if aType == 'vehicle' then destroyElement( aHit ); elseif aType == 'player' then outputChatBox ( 'Welcome In Safe Zone',aHit,255,0,0,true ); toggleControl ( aHit,'fire',false ); toggleControl ( aHit,'aim_weapon',false ); setElementData ( aHit,'NoKillData',true ); end end ); addEventHandler ( 'onColShapeLeave',Col, function ( aHit ) if getElementType ( LeaveElement ) == 'player' then outputChatBox ( 'Bye',aHit,0,255,0,true ); toggleControl ( aHit,'fire',true ); toggleControl ( aHit,'aim_weapon',true ); if getElementData ( aHit,'NoKillData' ) then removeElementData ( aHit,'NoKillData' ); end end end ); بالنسبة للكلنت انت مسوي انة يتأثر اذا تأثر من لاعب لذلك اذا تبية يتأثر من اي حاجة تقدر تسوية كذا : addEventHandler ( 'onClientPlayerDamage',localPlayer, function ( ) if getElementData ( source,'NoKillData' ) then cancelEvent ( ); 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