Jump to content

xX[تصحيح]Xx


Ahmed Eka

Recommended Posts

Posted

addCommandHandler ( "nuke",
	function ( thePlayer )   
local x,y,z = getElementPosition(thePlayer)
      local marker = createMarker ( x , y , z, "cylinder", 15, 255, 255, 0, 170 )
	  	if marker and getElementType(marker) == "marker" then
 if isElementWithinMarker(thePlayer, marker) then
	for _,p in ipairs(getElementsByType("player")) do
				if ( p ~= thePlayer ) then
					killPed (p)
				end
			end
		
		end
	
	end
	end
	
)

شباب الحين انا مسوي لما يكتب كلمه باف 8 

يسوي ماركر و كل يلي في الماركر يموت .. 

الحين ما يموت اللاعب .. انا عندي استفسار الحين انا ابيه يموت اللاعب 

مدري ليش وين الخطا ..

كمان الحين انا عندي استفسار .. الحين لو لاعب جاء دخل الماركر ما راح يقتلو صح ؟ 

 

Posted

اتوقع لازم كذا

addCommandHandler ( "nuke",
	function ( thePlayer )   
local x,y,z = getElementPosition(thePlayer)
      local marker = createMarker ( x , y , z, "cylinder", 15, 255, 255, 0, 170 )
	  	if marker and getElementType(marker) == "marker" then
 if isElementWithinMarker(thePlayer, marker) then
	for _,p in ipairs(getElementsByType("player")) do
				if ( p ~= thePlayer ) then
            killPlayer(p)
				end
			end
		
		end
	
	end
	end
	
)

 

Posted
1 minute ago, MR.Mosa said:

اتوقع لازم كذا

 


addCommandHandler ( "nuke",
	function ( thePlayer )   
local x,y,z = getElementPosition(thePlayer)
      local marker = createMarker ( x , y , z, "cylinder", 15, 255, 255, 0, 170 )
	  	if marker and getElementType(marker) == "marker" then
 if isElementWithinMarker(thePlayer, marker) then
	for _,p in ipairs(getElementsByType("player")) do
				if ( p ~= thePlayer ) then
            killPlayer(p)
				end
			end
		
		end
	
	end
	end
	
)

 

This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use killPed instead.

 

 

+ سطر 5 ماله داعي

 

  • Like 1
Posted
17 hours ago, NssoR said:

الكود طويل ع الفاضي , وش بتسوي بالضبط انت ؟

لما لاعب يكتب كلمه باف 8 .. يجي ماركر و اي شخص يكون بداخله يموت و اي شخص يدخل فيه يموت ..

Posted

ماجربته .. 

local Markers = { };

addCommandHandler ( "nuke" , function ( player )
if ( isElement ( Markers [ player ] ) ) then destroyElement ( Markers [ player ] ) end
local Pos = { getElementPosition ( player ) };
Markers [ player ] = createMarker (Pos[1],Pos[2],Pos[3]-1,"cylinder",255,255,0,255)
for index,values in ipairs ( getElementsByType ( "player" ) ) do 
if ( isElementWithinMarker ( values , Markers [ player ] ) ) then 
killPed ( values )
end
end
end );

addEventHandler ( "onPlayerQuit" , root , function ( )
if ( isElement ( Markers [ source ] ) ) then 
destroyElement ( Markers [ source ] )
Markers [ source ] = nil
end
end );

 

Posted (edited)
local marker = { }

addCommandHandler ( "nuke",
	function ( player )
	 if ( isElement ( marker [ player ] ) ) then destroyElement ( marker [ player ] ) end
		local x,y,z = getElementPosition ( player )
		marker [ player ] = createMarker ( x,y,z,"cylinder",15, 255, 255, 0, 170 )
addEventHandler ( "onMarkerHit",marker [ player ], function ( hitElement )
	if getElementType ( hitElement ) == "player"  and hitElement ~= player then 
			killPed ( hitElement )
		end
	end
)
setTimer ( function (	)
	for _,thePlayer in ipairs ( getElementsByType ( "player" ) ) do
		if isElementWithinMarker ( thePlayer,marker [ player ] ) then 
			if ( thePlayer == player ) then return false end 
					killPed ( thePlayer )
				end
			end
		end,3000,1 )
	end
)
addEventHandler ( "onPlayerQuit",root, 
 function ( ) 
	if ( isElement ( marker [ source ] ) ) then 
					destroyElement ( marker [ source ] )
					marker [ source ] = nil
		end
	end
)

 

Edited by Mr.Pres[T]ege
Posted (edited)

@Mr.Pres[T]ege

برستيج شكله النوم لاعب فيك لعب

 :lol:

الكود الصحيح بهذا الشكل :

local marker = { }

addCommandHandler ( "nuke",
	function ( player )
	 if ( isElement ( marker [ player ] ) ) then destroyElement ( marker [ player ] ) end
		local x,y,z = getElementPosition ( player )
		marker [ player ] = createMarker ( x,y,z,"cylinder",15, 255, 255, 0, 170 )
		addEventHandler ( "onMarkerHit",marker [ player ], function ( hitElement )
			if getElementType ( hitElement ) == "player" then 
				killPed ( hitElement )
			end
		end)
		for _,thePlayer in ipairs ( getElementsByType ( "player" ) ) do
			if isElementWithinMarker ( thePlayer,marker [ player ] ) then 
				killPed ( thePlayer )
			end
		end
	end
)

addEventHandler ( "onPlayerQuit",root, 	
function ( ) 
	if ( isElement ( marker [ source ] ) ) then 
		destroyElement ( marker [ source ] )
		marker [ source ] = nil
	end
end
)

 

Edited by NssoR
  • Like 1

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