Dzsozi (h03)

Members
  • Content count

    499
  • Joined

  • Last visited

Community Reputation

33 Good

4 Followers

About Dzsozi (h03)

  • Rank
    Hustler

Details

  • Location
    Hungary

Recent Profile Visitors

1,128 profile views
  1. Get All broken components of a vehicle?

    You can try using getVehiclePanelState
  2. Green screen shader

    I know about this resource, this is not what I would like to achieve.
  3. Green screen shader

    I don't think that it would work out as well, also this is lot of work for just a script that is I think is possible with dxDraw functions. I don't know if any of you have ever played on the Need For Speed SA server, like in the default NFS game, you can make magazine runs and magazine covers, and on this server, when you are making a magazine cover, you can select various backgrounds, but the making of the magazine simply happens in the free run mode, enabling just a kind of an editor for you. So there, you can change between various backgrounds, but when you changed a background it looks like there is just an image drawn on the screen behind your vehicle, it is the same effect that I would like to reach, but with a green background. Here's an example image: Without the background: With backgrounds: And I would like to reach this effect, but with a fully green background.
  4. Green screen shader

    I think it doesn't matter if I give "all" instead of "world" and "object" and then use engineRemoveShaderFromWorldTexture function on players and vehicles. Also, that is not the problem, the problem is written above, I just need solid green textures, without model shadows and such.
  5. Green screen shader

    Kinda what @pa3ck said. I just want to render everything green, like there is a dxDrawRectangle on the screen, but you can still see the players and vehicles, so I can just move around while everything is green and just take a screenshot, then put that image in photoshop or some image editor software and cut around the character or vehicle easily. That way I could avoid pixelated edges. And the reason I would like to make it as a shader or something similar, not with objects or 3D drawing things, is that I could make for example a rancher look like its driving over a rock on the hills, so the wheels look like there is something under it, but only the rancher would be visible, so I could make artworks and in-game commercial pictures, etc., I hope you could understand me this time. I just want to render EVERYTHING green, EXCEPT the players and the vehicles that are occupied, while I can just move around.
  6. Green screen shader

    That's not what I want to do.
  7. Green screen shader

    Alright, so I checked out what @pa3ck sent here, the topic, and I got the stuff from there, changed it up a little bit, and yes, everything changed to green, but I still have some problems: First of all, this is still not the result I would like to get, how I could remove the shadows and textures, since this is just changes the texture color, as I can see. My second problem is that as you can see on the picture, there are still some textures that not even get colored, how I could fix that? The third problem is that whenever I get into a vehicle, for some reason it remains green, but I can't see any errors in the script, not even debugscript outputs any, here's my current code: local myShader = dxCreateShader('greenscreen.fx', 0, 0, false, 'all') dxSetShaderValue(myShader, 'red', 0.0) dxSetShaderValue(myShader, 'green', 1.0) dxSetShaderValue(myShader, 'blue', 0.0) dxSetShaderValue(myShader, 'alpha', 1.0) engineApplyShaderToWorldTexture(myShader, '*') addEventHandler("onClientRender", root, function() local players = getElementsByType('player') for _, player in ipairs(players) do local vehicle = getPedOccupiedVehicle(player) if vehicle then engineRemoveShaderFromWorldTexture(myShader, '*', vehicle) end engineRemoveShaderFromWorldTexture(myShader, '*', player) end end) And the shader: float red; float green; float blue; float alpha; technique simple { pass P0 { MaterialAmbient = float4(red, green, blue, alpha); } } By the way, is there any way to draw a dxRectangle or something and then draw the players and vehicles on top of it? I guess that would be one more way to do it, but I don't know if it is possible, because it seems like that this won't work, with this shader. I appreciate your answer, but this is not what I would like to do, I would like to make the screen/everything green, except players and vehicles that are occupied, so if I take a screenshot and put it to photoshop I can make nicer artworks without choppy and ugly edges.
  8. Snowball Texture

    http://bfy.tw/CaZz
  9. Green screen shader

    Bump.
  10. Green screen shader

    I might try that, just to see how it would look like, but I still prefer the shader/other similar method, because if I want to make an artwork of the rancher for example, and I would like to make it look like it's driving through an obstacle, I must go on to a rock or something to make the wheels look correct, hope you know what I mean. However, if somebody could help me out with the shader method or has any other idea, please reply.
  11. Green screen shader

    That's not good for me, what about the ground? I would prefer if I could make everything green except the players and occupied vehicles, just to be sure that I can get the best results. I also think that I don't necessarily need shaders, but as I said, I can't think of another solution.
  12. Green screen shader

    It doesn't work also: Not the result I was expecting
  13. Green screen shader

    Hello! So, I would like to make something like a green screen shader, so I can take screenshots of players and vehicles, but I have never created or done shaders, my HLSL knowledge is 0, I don't know how shaders work. The effect I would like to reach looks like this (image taken from google): So how I would like my script to work: when I start the resource, there would be a colored texture applied to everything, except the local player, or if he/she is sitting in a vehicle then remove the shader from the vehicle as well. Like a green pane would appear behind the characters/vehicles, but I keep failing with my script. I don't know what would be the most efficient way to do this, I was thinking about this, but there might be other, easier methods as well, but I can't think about anything else. As I said before, I'm not experienced with shaders at all, could somebody help me out with this script? I would need this so I can make artworks and such, I would be really grateful! Here's my script: local sx, sy = guiGetScreenSize() local screenColor = {0,255,0,255} addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() greenScreenShader = dxCreateShader ( "greenscreen.fx",0,0,false,"all" ) local texture = dxCreateTexture ( sx, sy ) dxSetShaderValue ( greenScreenShader, "greenScreenTexture", texture ) dxSetShaderValue ( greenScreenShader, "screenColor", screenColor[1]/255, screenColor[2]/255, screenColor[3]/255, screenColor[4]/255 ) engineApplyShaderToWorldTexture ( greenScreenShader, "*" ) engineRemoveShaderFromWorldTexture ( greenScreenShader, "*", localPlayer ) end) local screenOutput = dxCreateScreenSource( scx, scy) addEventHandler ( "onClientHUDRender", root, function() if greenScreenShader then local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then engineRemoveShaderFromWorldTexture ( greenScreenShader, "*", vehicle ) end dxDrawImage( 0, 0, scx, scy, screenOutput, 0,0,0) end end) And my shader file (probably wrong, I don't even know what does things mean here, I copied these from other shader files): texture greenScreenTexture; float4 screenColor = float4(0.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0 ); technique simple { pass P0 { Texture[0] = greenScreenTexture; } } And this is the result I get: Could somebody help me out with this? Thank you for your answers in advance!
  14. [REL] Blips on screen

    UPDATE (1.0.3): - Added possibility to disable backgrounds with a variable - Disabled distance check on the Z axis, since this is a 2D display - textOffset works automatically now (you don't have to change that if you disable the background or change the image/background sizes)
  15. Good job, looks nice!