كودك يصير كذا .. :
local x, y, z = 100, 100, 100 -- الاحداثيات
local size = 1.5 -- الحجم
local r, g, b, a = 255, 0, 0, 255 -- اللون
local Marker = createMarker(x, y, z, "cylinder", size, r, g, b, a) -- نسوي ماركر
function MarkerHit( thePlayer )
if getElementType ( thePlayer ) == "player" then -- نتحقق أن اللي دخل الماركر لاعب
if ( getPlayerAccount ( thePlayer ) ) and not isGuestAccount ( getPlayerAccount ( thePlayer ) ) then
local HoHoName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- نجيب أكاونت اللاعب
if isObjectInACLGroup ("user."..HoHoName, aclGetGroup ( "Kill" ) ) then -- Kill نتحقق أن أكاونت اللاعب بقروب
triggerClientEvent ( thePlayer, "ShowPanel", thePlayer ) -- نسوي تريقر للكلنت نفتح فيه اللوحة
end
end
end
end
addEventHandler( "onMarkerHit", Marker, MarkerHit )