-- Server Side #
addEventHandler ('onMarkerHit', resourceRoot,function(hitPlayer)
local acc = getPlayerAccount(hitPlayer)
if getElementType (hitPlayer) == 'player' and acc and not isGuestAccount(acc) then
if ( getAccountData(acc,'ro5sa') == 'yes') then
triggerClientEvent (hitPlayer,'viewGUI', hitPlayer)
setCameraMatrix ( hitPlayer, 548.46484375, -1267.1435546875, 26.682792663574, 496.4482421875,-1342.6044921875,-13.315231323242, 0, 0)
setElementDimension(hitPlayer,755)
else
outputChatBox ('ليس لديك ؟؟؟', hitPlayer, 255, 0, 0, false)
end
end
end
)
الكود راح يكون لكل الماركرات بالسيرفر , اذا ما تبي كذا سوي شرط يتحقق من الماركرات الي تبيها
الي طرحتها تحتاج تسوي تحققات بسيطه setAccountData بالنسبه لـ
-- Server Side #
addEventHandler ('onMarkerHit',marker2,
function (plr)
local playeraccount = getPlayerAccount (plr)
if ( getElementType(plr) == 'player' ) and not getAccountData(playeraccount,'ro5sa') and ( playeraccount ) and not ( isGuestAccount(playeraccount) ) then
setAccountData ( playeraccount, 'ro5sa', 'yes' )
end
end
)