Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Cyber14's Achievements

Advanced Member

Advanced Member (8/54)



  1. Ok you were right. I analyzed the code and createObject() function works really quickly. My problem was connected with adding textures to all of this models on client-side (im using "UV scripted" resource from this site https://wiki.multitheftauto.com/wiki/Shader_examples) Maybe now @thisdp 's solution will have sense for loading shaders a bit slower?
  2. What about the face? How to have more than one face available per skin?
  3. I have no any problems with custom objects. I know It can be weird but I tested how long it takes to load objects with and without replacing models and it turned out that objects without replacing loaded faster.. Even when I create objects with no custom objects and then I run resource which replaces models it doesn't take more than 1-2 seconds to replace all models. I would like to add that I have about 3.000 objects to create on my server. In that case I will check solution with onClientRender event.
  4. Hi. I have a lot of objects on my server, all of them are created by server-side createObject() function on resource start but there is one problem with that. When someone connects to my server and the resource is started, the player have to wait a lot for objects loading. (It takes about 1 minute) So in order to reduce this time I moved some objects to other dimensions but It didnt give an effect. Now I have a question. Im going to change the way of creating objects. Im thinking about creating objects client-side and creating only this objects which actually are in the same dimension as the player is. When the player changes dimension, objects in previous dimension will be deleted and new objects from proper dimension will be created. Is that the good idea or there is any better solution?
  5. Hi, Im looking for shader whichch makes the object transparent and looking like window. This is what I have found: But there is no download link Somebody knows where can I find it?
  6. @Mr.Loki i did it on line 19 and It works but not as I wanted
  7. @Mr.Loki I tried to use your code by combining it with UV Scripted and the texture was white and my texture-image wasnt even visible. How can I change the color and which color format should I use? (I think that float4(1,1,1,1); is not "rgba" representation because it wasnt work) And can I make this color a bit transparent? This is my code (its from the file uv_scripted.fx because I have changed only this one): // // Example shader - uv_scripted.fx // #include "include/tex_matrix.fx" /////////////////////////////////////////////////////////////////////////////// // Global variables /////////////////////////////////////////////////////////////////////////////// texture gOrigTexure0 : TEXTURE0; texture gCustomTex0 : CUSTOMTEX0; float2 gUVPrePosition = float2( 0, 0 ); float2 gUVScale = float( 1 ); // UV scale float2 gUVScaleCenter = float2( 0.5, 0.5 ); float gUVRotAngle = float( 0 ); // UV Rotation float2 gUVRotCenter = float2( 0.5, 0.5 ); float2 gUVPosition = float2( 0, 0 ); // UV position float4 tColor = float4(1,1,1,1); // color /////////////////////////////////////////////////////////////////////////////// // Functions /////////////////////////////////////////////////////////////////////////////// //------------------------------------------- // Returns UV transform using external settings //------------------------------------------- float3x3 getTextureTransform() { return makeTextureTransform( gUVPrePosition, gUVScale, gUVScaleCenter, gUVRotAngle, gUVRotCenter, gUVPosition ); } /////////////////////////////////////////////////////////////////////////////// // Techniques /////////////////////////////////////////////////////////////////////////////// technique hello { pass P0 { // Set the texture Texture[0] = gCustomTex0; // Use custom texture // Set the UV thingy TextureTransform[0] = getTextureTransform(); // Enable UV thingy TextureTransformFlags[0] = Count2; MaterialDiffuse = tColor; MaterialEmissive = tColor; DiffuseMaterialSource = Material; EmissiveMaterialSource = Material; NormalizeNormals = TRUE; // FillMode = WIREFRAME; // AlphaBlendEnable = TRUE; ColorOp[0] = SELECTARG1; ColorArg1[0] = Diffuse; AlphaOp[0] = SELECTARG1; AlphaArg1[0] = Diffuse; Lighting = true; } }
  8. Hi im using "UV scripted" shader to set textures to my objects but im wondering if I can set texture color in MTA using shaders? This method is possible in SAMP by setting the "materialcolor" parametr using the SetObjectMaterial function. I would like to use it like changing the texture scale in UV Scripted, its just: dxSetShaderValue ( myShader, "gUVScale", 1, 1); and the scale changes. I would like to have something like this dxSetShaderValue ( myShader, "gUVColor", 255, 0, 0); for red color. Does anyone know how to do it?
  9. I am just used to using materials from GTA SA to decorate the buildings, stuffs, etc. Thats all what Im gonna do.
  10. @Mr.Loki So the only one solution to use GTA SA materials is to extract and upload the whole gta3.img file to png images and using shaders?
  11. Hi, Im wondering if there in MTA is any possibility of changing the object texture (on each index) like in the SAMP (in SAMP this function is called SetObjectMaterial). I know that I can use shader for that (its called "UV scripted") and using this shader I can apply images to the specified object on specified index but it forces me to upload images on my server and make it weight so much if I wanna have a lot of materials. So my question is - Can I use GTA SA materials for that, not only uploaded images?
  12. @AlexRazor Could you tell me how can I do that? (URL to some tutorial, etc.)
  13. I have just edited the house object from GTA SA in 3ds max. Everything was good untill the night came.. This is how my model looks like in the night: (Its brighter than normal objects outside blue cricle) And when we have the day it looks good: DFF file was exported by KAM's script. Anyone knows how to get rid of this problem?
  14. @TEDERIs You are right, when I used TXD Workshop 5.0 it worked for me too. It turns out that the newest TXD Workshop version has some problems with that. Thanks for help to everybody, my problem is solved!
  • Create New...