Mhmd.z Posted January 7, 2016 Share Posted January 7, 2016 السلام عليكم ورحمة الله وبركاته ابي تصححيح لذا الكود انه يعطي الاعب داتا بشكل عشوائي من ذول الداتا , يعني او بعطيه داتا 1 او داتا 2...... local Data = math.random ( data1, data2, data3, data4, data5 ) setElementData(player, Data, (getElementData(player, Data) or 0) + 1) Link to comment
shwaeki Posted January 7, 2016 Share Posted January 7, 2016 local Data = { "Data1", "Data2", "Data3" } local RandomData = Data[math.random ( #Data )] outputChatBox(RandomData) setElementData(player, RandomData, (getElementData(player, RandomData) or 0) + 1) Link to comment
Mhmd.z Posted January 7, 2016 Author Share Posted January 7, 2016 شكرا, ممكن تعطيني فنكشنات الي تسوي صوره فوق الماركر؟ Link to comment
shwaeki Posted January 7, 2016 Share Posted January 7, 2016 local Url = "name.png" --- اسسم الصورة هنا local zUP = 4 ---- ارتفأع الصورة addEventHandler( "onClientRender", root, function ( ) local x, y, z = getElementPosition( marker ) 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 ) 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