Search the Community
Showing results for tags 'dxcreatetexture'.
-
In dxCreateTexture there is an argument called mipmaps. It will generate multiple copies in different resolutions, so that it looks good. If I create these mipmaps manually, do I have to enable or disable this option? (dds (image) files can have mipmaps included) element dxCreateTexture ( string pixels [, string textureFormat = "argb", bool mipmaps = true, string textureEdge = "wrap" ] ) element dxCreateTexture ( string pixels [, string textureFormat = "argb", bool mipmaps = true, string textureEdge = "wrap" ] )
-
Hello, i'm doing this post today because i need help with this. I've tried everything but i have not succeeded, i want to know how i can center this image under my feets, i mean, under the player, ¡just there! without losing that size ((( x, y, z_ground, 1, 2.5))) in the picture.. This is the script script, i hope u can help me with this pleaaaaaase local imagen = dxCreateTexture( "test.png" ) local activado = { } local players = getElementsByType( 'player' ) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...) end addEventHandler( "onClientRender", root, function( ) for i=1, #players do local p = players[i] if activado[ p ] == true then local x, y, z = getElementPosition( p ) local z_ground = getGroundPosition( x, y, z ) dxDrawImage3D( x, y, z_ground, 1, 2.5, imagen, tocolor( 0, 255, 230, 255 ), 0, x, y, z ) end end end ) function removeEffect( player ) if activado[ player ] == true then activado[ player ] = nil end end addEvent( "vip:farvel", true ) addEventHandler( "vip:farvel", getRootElement( ), function( player ) if not activado[ player ] or activado[ player ] == nil then activado[ player ] = true setTimer( removeEffect, 5000, 1, player ) end end ) Thanks, also, i hope you can read this and help me.
- 14 replies
-
- dxdrawimage3d
- centerimage3d
- (and 6 more)