@Mr.Pres[T]ege
برستيج شكله النوم لاعب فيك لعب
الكود الصحيح بهذا الشكل :
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
)