#Mr.alkmasha Posted August 22, 2014 Share Posted August 22, 2014 اسلام عليكم ابي كود اذا الاعب كان ب اسل معين يجي صوره فوق راسه الي عنده ما يبخل Link to comment
al-Kobra Posted August 22, 2014 Share Posted August 22, 2014 Server Side ! function getPlayerAccount isGuestAccount isObjectInACLGroup setElementData Client Side ! 'onClientRender' getElementPosition getScreenFromWorldPosition getCameraMatrix getDistanceBetweenPoints3D dxDrawText Link to comment
</Mr.Tn6eL> Posted August 22, 2014 Share Posted August 22, 2014 Server Side !function getPlayerAccount isGuestAccount isObjectInACLGroup setElementData Client Side ! 'onClientRender' getElementPosition getScreenFromWorldPosition getCameraMatrix getDistanceBetweenPoints3D dxDrawText قال صورة وناقصك كم فنشكن "onResourceStart" -- حدث اول مايتشغل المود getElementsByType -- نسوي لوب لجميع الاعبين ونتحقق انهم بقروب الاسل ونحط لهم الدتا "onPlayerLogin" -- عند تسجيل دخول الاعب ونتحقق ان معه القروب ونسوي له الداتا dxDrawImage -- لصنع الصورة Link to comment
#Mr.alkmasha Posted August 22, 2014 Author Share Posted August 22, 2014 اسويه و اذا خربان اجيبه تصلحوه؟ Link to comment
</Mr.Tn6eL> Posted August 22, 2014 Share Posted August 22, 2014 ايوه ليش لا هنا للمساعدة Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 الكود مطروح سابقـأ .. : هذي طريقة عشان الصورة تكون لقروب محدد .. Client Side ! local Url = "crown.png" --- اسسم الصورة هنا local zUP = 10 ---- ارتفأع الصورة addEventHandler( "onClientRender", root, function ( ) if ( getElementData ( localPlayer, "VIPData" ) == true ) then local x, y, z = getElementPosition( localPlayer ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 15 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z + zUP, 0.07 ) if ( WorldPositionX and WorldPositionY ) then dxDrawImage( WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, Url ) end end end end ) Server Side ! 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 ( "V.I.P" ) ) ) then setElementData ( players, "VIPData", true ) end end end end ) addEventHandler ( "onPlayerLogin", root, function ( _,acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "V.I.P" ) ) ) then setElementData ( source, "VIPData", true ) end end ) Link to comment
#Mr.alkmasha Posted August 22, 2014 Author Share Posted August 22, 2014 الكود مطروح سابقـأ .. : هذي طريقة عشان الصورة تكون لقروب محدد .. Client Side ! local Url = "crown.png" --- اسسم الصورة هنا local zUP = 10 ---- ارتفأع الصورة addEventHandler( "onClientRender", root, function ( ) if ( getElementData ( localPlayer, "VIPData" ) == true ) then local x, y, z = getElementPosition( localPlayer ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 15 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z + zUP, 0.07 ) if ( WorldPositionX and WorldPositionY ) then dxDrawImage( WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, Url ) end end end end ) Server Side ! 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 ( "V.I.P" ) ) ) then setElementData ( players, "VIPData", true ) end end end end ) addEventHandler ( "onPlayerLogin", root, function ( _,acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "V.I.P" ) ) ) then setElementData ( source, "VIPData", true ) end end ) ذا يبين بس للاعب الي معاه الرتبه اما ل باقي الاعبين ما يبين Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 لا للاعبين جميعهم .. عشان الصورة تجي ع اللاعب نفسه Link to comment
jafar Posted August 22, 2014 Share Posted August 22, 2014 لا للاعبين جميعهم .. عشان الصورة تجي ع اللاعب نفسه استخدم لوب عشان تظهر للكل لان طريقتك راح تكون الصورة تطلع حق اللاعب الي عنده الداتا فقط Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 يب ! .. الصورة للاعب نفسه فقط .. لو يبيها للجميع يسوي لوب .. انا سويتها كذا من باب تخفيف اللاق . Link to comment
#Mr.alkmasha Posted August 22, 2014 Author Share Posted August 22, 2014 كيف يعني لوب؟ Link to comment
xFace[B]ook Posted August 22, 2014 Share Posted August 22, 2014 for k,v in ipairs (getElementsByType('player')) do ---- your Code end Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 (edited) local Url = "crown.png" --- اسسم الصورة هنا local zUP = 10 ---- ارتفأع الصورة addEventHandler( "onClientRender", root, function ( ) for _, v in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( v, "VIPData" ) == true ) then local x, y, z = getElementPosition( v ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 15 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z + zUP, 0.07 ) if ( WorldPositionX and WorldPositionY ) then dxDrawImage( WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, Url ) end end end end end ) Edited August 22, 2014 by Guest Link to comment
jafar Posted August 22, 2014 Share Posted August 22, 2014 ليش البريك؟ فرضاً فيه شخصين معاهم الرتبة , راح ياخذ بس شخص واحد , ويسوي بريك للوب وهكذا -.- Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 صحيح .. نسيت انه لو حطيت بريكـ تصير لشخص واحد Link to comment
#Mr.alkmasha Posted August 22, 2014 Author Share Posted August 22, 2014 صحيح .. نسيت انه لو حطيت بريكـ تصير لشخص واحد حيرتوني اركب الكود ام لا؟ Link to comment
#DRAGON!FIRE Posted August 22, 2014 Share Posted August 22, 2014 عدلته كان في خطا بسيط .. انسخ الكود مرة ثانية Link to comment
#Mr.alkmasha Posted August 22, 2014 Author Share Posted August 22, 2014 عدلته كان في خطا بسيط .. انسخ الكود مرة ثانية مشكور ما قصرت Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now