#Mr.alkmasha Posted January 28, 2015 Share Posted January 28, 2015 .اسلام عليكم ابي فنكشات يجي كتابه فوق راس لاعب معاه رتبه معينه Link to comment
iMr.TZ[W]ER Posted January 28, 2015 Share Posted January 28, 2015 onPlayerLogin isObjectInACLGroup بالنسبة للكلام دي اكس Link to comment
#MFGR7OM Posted January 29, 2015 Share Posted January 29, 2015 ^ + dxDrawText -- خلي الكلام دي اكس Link to comment
xb0 Posted January 29, 2015 Share Posted January 29, 2015 ^ + dxDrawText -- خلي الكلام دي اكس ممكن شوي شرح زيادة الحين يوم استخدمتها يجيني اسم المنطقه الي انا فيها شلون اخليها فوق راس اللاعب ومو كل اللاعبين +عشان اضيف القروب المحدد Link to comment
iMr.TZ[W]ER Posted January 29, 2015 Share Posted January 29, 2015 getElementPosition علشان تجيب محل اللاعب وتزيد شوي بالارتفاع علشان تجي فوق راسه Link to comment
#MFGR7OM Posted January 29, 2015 Share Posted January 29, 2015 تزوير ممكن لما تعطيه كود تستخدم lua علشان يوصل للفنكش بسرعه getElementPosition Link to comment
#DRAGON!FIRE Posted January 29, 2015 Share Posted January 29, 2015 هذي صورهـ لكن عدلها تعديل بسيط وسوها تكست . ... وهذا فنكشن بجانب سيرفر isObjectInACLGroup انت مستخدم هذي طريقة عشان الصورة تكون لقروب محدد .. Client Side ! 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 ) 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 ) addEventHandler ( "onPlayerLogout", root, function ( acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "V.I.P" ) ) ) then removeElementData ( source, "VIPData" ) end end ) Link to comment
xb0 Posted January 29, 2015 Share Posted January 29, 2015 اخوي جربت والكود حقك +غيرت القروب وخليته للكونسل وماضبط ممكن تعطيني الكود كامل + سويت الكود حقك وحطيت صوره ومالقيتها فوق راسي Link to comment
The Killer Posted January 29, 2015 Share Posted January 29, 2015 تحقق من الميتا , وتحقق انك غيرت اسم الصوره لو ما ضبط ورنا وش سويت Link to comment
xb0 Posted January 30, 2015 Share Posted January 30, 2015 كلينت local Url = "3.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 ) سيرفر 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 ) addEventHandler ( "onPlayerLogout", root, function ( acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "Console" ) ) ) then removeElementData ( source, "VIPData" ) end end ) Link to comment
#DRAGON!FIRE Posted January 30, 2015 Share Posted January 30, 2015 غريبة الكود من فترهـ طويلة شوية جربته وكان شغال .. اطرح الميتا . Link to comment
#Mr.alkmasha Posted January 30, 2015 Author Share Posted January 30, 2015 عندي مشكله انا سويت كود يجي صوره ل واحد معاه رتبة فيب بس يوم اسجل ما يجي التاج فوق راسي يجي فوق الاعبين Client local tag = dxCreateTexture("img/crown.png") addEventHandler("onClientPreRender", root, function() for i, player in ipairs ( getElementsByType ( "player" ) ) do --for i, player in ipairs(getElementsByType("player")) do if player ~= localPlayer and ( getElementData ( localPlayer, "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 ( "VIP" ) ) ) then setElementData ( players, "VIPData", true ) end end end end ) addEventHandler ( "onPlayerLogin", root, function ( _,acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "VIP" ) ) ) then setElementData ( source, "VIPData", true ) end end ) Link to comment
#MFGR7OM Posted January 30, 2015 Share Posted January 30, 2015 انت ماخذ فيب...+ سطر رقم 6 بالكلنت مسحته...؟ Link to comment
#Mr.alkmasha Posted January 30, 2015 Author Share Posted January 30, 2015 انت ماخذ فيب...+ سطر رقم 6 بالكلنت مسحته...؟ ذا مو الي فوق يا حبيبي انا مسوي كلنت و ماخذ سيرفر من فوق Link to comment
xb0 Posted January 30, 2015 Share Posted January 30, 2015 غريبة الكود من فترهـ طويلة شوية جربته وكان شغال .. اطرح الميتا . Link to comment
nxFairlywell Posted January 30, 2015 Share Posted January 30, 2015 مو ضروري اساسا سيرفر type لأن Link to comment
#Mr.alkmasha Posted January 30, 2015 Author Share Posted January 30, 2015 طيب وش مشكلة عندي مشكله انا سويت كود يجي صوره ل واحد معاه رتبة فيببس يوم اسجل ما يجي التاج فوق راسي يجي فوق الاعبين Client local tag = dxCreateTexture("img/crown.png") addEventHandler("onClientPreRender", root, function() for i, player in ipairs ( getElementsByType ( "player" ) ) do --for i, player in ipairs(getElementsByType("player")) do if player ~= localPlayer and ( getElementData ( localPlayer, "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 ( "VIP" ) ) ) then setElementData ( players, "VIPData", true ) end end end end ) addEventHandler ( "onPlayerLogin", root, function ( _,acc ) if ( isObjectInACLGroup ( "user."..getAccountName( acc ), aclGetGroup ( "VIP" ) ) ) then setElementData ( source, "VIPData", true ) end end ) - Link to comment
#DRAGON!FIRE Posted January 31, 2015 Share Posted January 31, 2015 ما ادري عن الكود لو في اخطاء ثانية لكن جرب : local tag = dxCreateTexture("img/crown.png") addEventHandler("onClientPreRender", root, function() for i, player in ipairs ( getElementsByType ( "player" ) ) do --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 ) انا جربت الكود وشغال بس ما ادري صراحة يمكن المشكلة من عندك xb0 بالنسبة لـ 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