Jump to content

Blaawee

Members
  • Posts

    857
  • Joined

  • Last visited

Everything posted by Blaawee

  1. Blaawee

    image on text

    What are you using to draw the text?
  2. You're mixing client and server functions together.
  3. Is that all the code? try to re-check the table and guiSetVisible things.
  4. seems like you not visiting the wiki. guiGridListAddRow got only one arg which is the gui element. and one more thing! ATTENTION: Without guiGridListSetItemText there is no row added to the grid. Look at the example, first you give the row a name with row = guiGridListAddRow ( playerList ), and then you use guiGridListSetItemText.
  5. i found that images on the internet,hard to believe you made it. i will remove it if you can prove you made it. Actually, It's belongs to Empire Of Riders "ER" which Gallardo9944 own that server. i've been playing in that server.
  6. I guess you can. By creating a target for render with dxCreateRenderTarget fit the gui then use dxSetShaderTransform. after that draw you shader.
  7. Are you kidding with me?? hasObjectPermissionTo is a client?? Which one is worked??
  8. Client: local gAdminTable = { }; addEvent( "getAdminTabel", true ); addEventHandler ( "getAdminTabel", root, function( table ) if table and type( table ) == 'table' then gAdminTable = table; else error( 'No table.'); end end ); addEventHandler ( "onClientRender", root, function( ) local index = 0 for admins in pairs( gAdminTable ) do if admins and getElementType( admins ) == 'player' then local color = tocolor( getPlayerNametagColor ( admins ) ); dxDrawAdminsLabel ( admins, index, color ); index = index + 1; end end end ); function dxDrawAdminsLabel ( player, index, color ) local sx, sy = guiGetScreenSize ( ) local px, py = sx - 200, sy * 0.4 + 20 * sy / sy * index dxDrawText ( getPlayerName ( player ):gsub('#%x%x%x%x%x%x', ''), px + 1, py + 1, px, py, tocolor ( 10, 10, 10, 255 ), sy / sy, 'default-bold', 'left', 'top', false, false, true, true, false ) dxDrawText ( getPlayerName ( player ), px, py, px, py, color, sy / sy, 'default-bold', 'left', 'top', false, false, true, true, false ) end Server: local adminTable = { }; function isPlayerAdmin ( player ) if player and isElement( player ) and getElementType( player ) == 'player' then for _, aclGroup in ipairs ( { 'Admin', 'Moderator', 'SuperModerator' } ) do if isObjectInACLGroup ( "user." ..getAccountName( getPlayerAccount( player ) ) , aclGetGroup ( aclGroup ) ) then return true else return false end end end end function updateOnlineAdmin ( ) triggerClientEvent( 'getAdminTabel', root, adminTable ); end addEventHandler( 'onPlayerLogin', root, function( ) if isPlayerAdmin( source ) then if adminTable[ source ] then adminTable[ source ] = nil; end adminTable[ source ] = true; updateOnlineAdmin( ); end end ); addEventHandler ( 'onPlayerLogout', root, function( ) if adminTable[ source ] then adminTable[ source ] = nil; end updateOnlineAdmin( ); end ); addEventHandler ( "onPlayerQuit", root, function( ) if adminTable[ source ] then adminTable[ source ] = nil; end updateOnlineAdmin( ); end );
  9. Blaawee

    Race marker

    SetMarkerTarget
  10. Blaawee

    I need help

    I didn't get what's your problem is!
  11. I guess you missed adding a new row guiGridListAddRow
  12. Blaawee

    how 3d images?

    Test Test Test Try this: Remember To Use my .FX file. function dxDrawText3D( text, left, top, right, bottom, color, scale, font, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ, alignX, alignY, clip, wordBreak, postGUI, colorCoded ) if not text or not left or not top then return; end local right = right or 0; local bottom = bottom or 0; local color = color or tocolor( 255, 255, 255, 255 ); local scale = scale or 1; local font = font or "default"; local rotX = rotX or 0; local rotY = rotY or 0; local rotZ = rotZ or 0; local rotOfX = rotOfX or 0; local rotOfY = rotOfY or 0; local rotOfZ = rotOfZ or 0; local alignX = alignX or "left"; local alignY = alignY or "top"; local clip = clip or false; local wordBreak = wordBreak or false; local postGUI = postGUI or false; local colorCoded = colorCoded or true; local textWidth = dxGetTextWidth( text, scale, font ); local fontHeight = dxGetFontHeight( scale, font ); local drawSurface = dxCreateRenderTarget( textWidth, fontHeight, true ); if not drawSurface then return; end if not texShader then return; end dxSetShaderValue( texShader, 'threeDimTex', drawSurface ) dxSetRenderTarget( drawSurface ) dxDrawText( text, 0, 0, textWidth, fontHeight, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, true ) dxSetRenderTarget( ) dxSetShaderTransform( texShader, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ ); dxDrawImage( left, top, textWidth, fontHeight, texShader, 0, 0, 0, tocolor( 255, 255, 255, 255 ), postGUI ); destroyElement( drawSurface ); end
  13. Blaawee

    how 3d images?

    Sorry buddy.. I was kinda busy. About the resource.. i did tried it and it's working normal nothing stopped or anything! i think it's about your calculation? Maybe you did it wrong! Try this instead : local texShader = dxCreateShader('shared.fx'); local imagee = "image.png"; function dxDrawImage3D( posX, posY, width, height, image, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ, color, postGUI ) if not posX or not posY or not width or not height or not image then return; end local rotX = rotX or 0; local rotY = rotY or 0; local rotZ = rotZ or 0; local rotOfX = rotOfX or 0; local rotOfY = rotOfY or 0; local rotOfZ = rotOfZ or 0; local color = color or tocolor( 255, 255, 255, 255 ); local postGUI = postGUI or false; local drawSurface = dxCreateRenderTarget( width, height, true ); -- Need to set the third arg to true to be created with an alpha channel. if not drawSurface then return; end if not texShader then return; end dxSetShaderValue( texShader, 'threeDimTex', drawSurface ); dxSetRenderTarget( drawSurface, true ); dxDrawImage( 0, 0, width, height, image, 0, 0, 0, color ); dxSetRenderTarget( ); dxSetShaderTransform( texShader, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ ); dxDrawImage( posX, posY, width, height, texShader, 0, 0, 0, tocolor(255, 255, 255, 255), postGUI ); -- Draw the shader. destroyElement( drawSurface ) end function testing1() dxDrawImage3D( 250, 250, 500, 500, imagee, math.abs( getTickCount( )/20 ), 10, 30 )--,10,10,25,15,20,30,tocolor(255,255,255,255),true); end; addEventHandler("onClientRender",root,testing1);
  14. Blaawee

    how 3d images?

    That's weird! Do you mind to upload the whole thing to test it?
  15. Blaawee

    Problem

    From reading the codes it's looks good and no error unless! That's the whole code. Cuz it's missing sWidth, sHeight variables.
  16. Blaawee

    Problem

    Is there any debug error?
  17. Blaawee

    how 3d images?

    Example i did create a new function for you. Remember to use this .FX File. 3DPass.fx: // // texPass.fx // Author: Blaawee // texture threeDimTex; technique tech { pass P0 { Texture[0] = threeDimTex; } } -- dxDrawImage3D( float posX, float posY, float width, float height, mixed image, float rotX, float rotY, float rotZ, float rotOfX, float rotOfY, float rotOfZ, int color, bool postGUI ) local texShader = dxCreateShader('3DPass.fx'); function dxDrawImage3D( posX, posY, width, height, image, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ, color, postGUI ) if not posX or not posY or not width or not height or not image then return; end local rotX = rotX or 0; local rotY = rotY or 0; local rotZ = rotZ or 0; local rotOfX = rotOfX or 0; local rotOfY = rotOfY or 0; local rotOfZ = rotOfZ or 0; local color = color or tocolor( 255, 255, 255, 255 ); local postGUI = postGUI or false; local drawSurface = dxCreateRenderTarget( width, height, true ); -- Need to set the third arg to true to be created with an alpha channel. if not drawSurface then return; end if not texShader then return; end dxSetShaderValue( texShader, 'threeDimTex', drawSurface ); dxSetShaderTransform( texShader, rotX, rotY, rotZ, rotOfX, rotOfY, rotOfZ ); dxSetRenderTarget( drawSurface ); dxDrawImage( 0, 0, width, height, image, 0, 0, 0, color ); dxSetRenderTarget( ); dxDrawImage( posX, posY, width, height, texShader, 0, 0, 0, tocolor(255, 255, 255, 255), postGUI ); -- Draw the shader end
  18. Blaawee

    how 3d images?

    DxDrawImage3D DxDrawRectangle3D That's for GTA world. I think he need to use shaders to achieve he's need.
  19. Hmmm.. Why don't you get the text and set the text with the old one plus the new one?? local oldText = guiGetText( gui-edit ); local newText = guiSetText( gui-edit, oldText .. "1" );
×
×
  • Create New...