Jump to content

x[ تصحيح ]x كود


#STZ

Recommended Posts

السلام عليكم و رحمة الله وبركاته

سويت كود يسوي منطقة ع الخريطة

واللي يدخل ما يموت و لا يمديه يدخل بسيارة

:( سويت اذا دخل ياخذ داتا و ما يموت اذا معه لاكن اموت 

 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

 
  1. addEventHandler ( "onClientPlayerDamage", getLocalPlayer(),
  2. function ( attacker, weapon, bodypart )
  3. if ( attacker and getElementType(attacker) == 'player' and attacker ~= source ) then
  4. if ( getElementData(source,'NoKillData') ) then
  5. cancelEvent()
  6. end
  7. end
  8. end
  9. )
?

 
  1.  
  2. sezi = 30
  3. x,y,z = 267.10522, 1975.09656, 20
  4. Col = createColRectangle (x,y,z,sezi)
  5. Radar = createRadarArea (x,y,z,sezi,0,255,0,255,root)
  6.  
  7.  
  8.  
  9. addEventHandler("onColShapeHit",Col,function (HitElement)
  10. if getElementType(HitElement) == "vehicle" then
  11. destroyElement( HitElement )
  12. elseif getElementType(HitElement) == "player" then
  13. outputChatBox("Welcome In Safe Zone",HitElement,255,0,0,true)
  14. toggleControl (HitElement,"fire",false)
  15. toggleControl (HitElement,"aim_weapon",false)
  16. setElementData( HitElement , 'NoKillData' , true )
  17. end
  18. end)
  19. addEventHandler("onColShapeLeave",Col,function (LeaveElement)
  20. if getElementType(LeaveElement) == "player" then
  21. outputChatBox("Bye",LeaveElement,0,255,0,true)
  22. toggleControl (LeaveElement,"fire",true)
  23. toggleControl (LeaveElement,"aim_weapon",true)
  24. setElementData( LeaveElement , 'NoKillData' , false )
  25. end
  26. end)
Link to comment

  

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

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