-----Client
local tag = dxCreateTexture("3.png") --- اسم الصورة
addEventHandler("onClientPreRender", root,
function()
for i, player in ipairs ( getElementsByType ( "player" ) ) do
if ( getElementData ( player, "VIPData" ) == true ) then
local x, y, z = getPedBonePosition(player, 5)
dxDrawMaterialLine3D(x, y, z+0.5, x, y, z+0.3, tag, 0.7, tocolor(255,255,255,255))
end
end
end
)
----Server
addEventHandler ( "onResourceStart", resourceRoot, function ( )
for _,players in ipairs ( getElementsByType ( "player" ) ) do
if ( getPlayerAccount( players ) and not isGuestAccount( getPlayerAccount( players ) ) ) then
if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( players ) ), aclGetGroup ( "Console" ) ) ) then --- اسم الرتبة
setElementData ( players, "VIPData", true )
end
end
end
end )
addEventHandler ( "onPlayerLogin", root, function ( _,acc )
if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "Console" ) ) ) then--اسم الرتبة
setElementData ( source, "VIPData", true )
end
end )