XaskeL

Members
  • Content Count

    216
  • Joined

  • Last visited

  • Days Won

    3

XaskeL last won the day on October 17 2019

XaskeL had the most liked content!

Community Reputation

44 Good

4 Followers

About XaskeL

  • Rank
    Trick
  • Birthday 25/02/2002

Details

  • Gang
    Russian Boy!
  • Location
    Taiga
  • Occupation
    Vodka, Bear!
  • Interests
    Balalaika

Recent Profile Visitors

2,532 profile views
  1. Hey. Do not try to hack my development. You spoil the life of people who want to have the privacy of their assets.
  2. Completely finished code, as well as an example of use inside. Also, a resource is ready to download protected files (loader). Link: https://www.dropbox.com/s/0cpkkuwjdqa6nvt/protection dff %26 txd files example.rar?dl=0
  3. It is worth testing. And the key is what you encrypt your file and decrypt, it is advisable to come up with it yourself. After that, you need to encrypt the models and in the client-side decrypt in RAW and load.
  4. Example: function string_padding_dword(s) local l = 4 - string.len(s) % 4 return s .. string.rep(string.char(l), l) end function string_unpadding_dword(s) return string.sub(s, 0, string.len(s) - string.byte(s, string.len(s))) end function FileProtection(path, key) local file = fileOpen(path) local size = fileGetSize(file) local FirstPart = fileRead(file, 65536) fileSetPos(file, 65536) local SecondPart = fileRead(file, size - 65536) fileClose(file) file = fileCreate(path..'rw') fileWrite(file, encodeString('tea', string_padding_dword(FirstPart), { key = key })..SecondPart) fileClose(file) return true end function FileUnProtection(path, key) local file = fileOpen(path) local size = fileGetSize(file) local FirstPart = fileRead(file, 65536 + 4) fileSetPos(file, 65536 + 4) local SecondPart = fileRead(file, size - (65536 + 4)) fileClose(file) -- file = fileCreate(path..'rw') -- fileWrite(file, string_padding_dword( decodeString('tea', FirstPart, { key = key }) )..SecondPart) -- fileClose(file) return string_padding_dword( decodeString('tea', FirstPart, { key = key }) )..SecondPart end -- example FileProtection('infernus.dff', 'GT4BAE') -- FileUnProtection(path, key) local txd = engineLoadTXD('infernus.txd') engineImportTXD(txd, 401) local dff = engineLoadDFF( FileUnProtection('infernus.dff', 'GT4BAE') ) engineReplaceModel(dff, 401)
  5. Не стал бы я доверять этому, никак, вообще.
  6. XaskeL

    [Help] HLSL

    local texel = dxCreateTexture('textures/m4blue.png', 'dxt1') dxSetShaderValue(shader, "TEXTURE", texture)
  7. XaskeL

    [Help] HLSL

    // // fx_pre_object.fx // //--------------------------------------------------------------------- // Variables //--------------------------------------------------------------------- float3 sElementOffset = float3(0,0,0); float3 sWorldOffset = float3(0,0,0); float3 sCameraPosition = float3(0,0,0); float3 sCameraForward = float3(0,0,0); float3 sCameraUp = float3(0,0,0); float sFov = 1; float sAspect = 1; float2 sMoveObject2D = float2(0,0); float2 sScaleObject2D = float2(1,1); float sAlphaMult = 1; float sProjZMult = 2; texture newTexture : TEXTURE; // CUSTOM TEXTURE sampler newTextureSampler = sampler_state { Texture = (newTexture); }; //--------------------------------------------------------------------- // Include some common stuff //--------------------------------------------------------------------- texture gTexture0 < string textureState="0,Texture"; >; matrix gProjectionMainScene : PROJECTION_MAIN_SCENE; float4x4 gWorld : WORLD; texture secondRT < string renderTarget = "yes"; >; int gLighting < string renderState="LIGHTING"; >; float4 gGlobalAmbient < string renderState="AMBIENT"; >; int gAmbientMaterialSource < string renderState="AMBIENTMATERIALSOURCE"; >; int gDiffuseMaterialSource < string renderState="DIFFUSEMATERIALSOURCE"; >; int gEmissiveMaterialSource < string renderState="EMISSIVEMATERIALSOURCE"; >; float4 gMaterialAmbient < string materialState="Ambient"; >; float4 gMaterialDiffuse < string materialState="Diffuse"; >; float4 gMaterialSpecular < string materialState="Specular"; >; float4 gMaterialEmissive < string materialState="Emissive"; >; int CUSTOMFLAGS <string createNormals = "yes"; string skipUnusedParameters = "yes"; >; float4 gTextureFactor < string renderState="TEXTUREFACTOR"; >; //--------------------------------------------------------------------- // Sampler for the main texture //--------------------------------------------------------------------- sampler Sampler0 = sampler_state { Texture = (gTexture0); }; //--------------------------------------------------------------------- // Structure of data sent to the vertex shader //--------------------------------------------------------------------- struct VSInput { float3 Position : POSITION0; float4 Diffuse : COLOR0; float2 TexCoord0 : TEXCOORD0; }; //--------------------------------------------------------------------- // Structure of data sent to the pixel shader ( from the vertex shader ) //--------------------------------------------------------------------- struct PSInput { float4 Position : POSITION0; float4 Diffuse : COLOR0; float2 TexCoord0 : TEXCOORD0; }; //-------------------------------------------------------------------------------------- // createViewMatrix //-------------------------------------------------------------------------------------- float4x4 createViewMatrix( float3 pos, float3 fwVec, float3 upVec ) { float3 zaxis = normalize( fwVec); // The "forward" vector. float3 xaxis = normalize( cross( -upVec, zaxis ));// The "right" vector. float3 yaxis = cross( xaxis, zaxis ); // The "up" vector. // Create a 4x4 view matrix from the right, up, forward and eye position vectors float4x4 viewMatrix = { float4( xaxis.x, yaxis.x, zaxis.x, 0 ), float4( xaxis.y, yaxis.y, zaxis.y, 0 ), float4( xaxis.z, yaxis.z, zaxis.z, 0 ), float4(-dot( xaxis, pos ), -dot( yaxis, pos ), -dot( zaxis, pos ), 1 ) }; return viewMatrix; } //------------------------------------------------------------------------------------------ // createProjectionMatrix //------------------------------------------------------------------------------------------ float4x4 createProjectionMatrix(float near_plane, float far_plane, float fov_horiz, float fov_aspect, float2 ss_mov, float2 ss_scale) { float h, w, Q; w = 1/tan(fov_horiz * 0.5); h = w/fov_aspect; Q = far_plane/(far_plane - near_plane); // Create a 4x4 projection matrix from given input float4x4 projectionMatrix = { float4(w * ss_scale.x, 0, 0, 0), float4(0, h * ss_scale.y, 0, 0), float4(ss_mov.x, ss_mov.y, Q, 1), float4(0, 0, -Q*near_plane, 0) }; return projectionMatrix; } //------------------------------------------------------------------------------------------ // MTACalcGTABuildingDiffuse //------------------------------------------------------------------------------------------ float4 MTACalcGTABuildingDiffuse( float4 InDiffuse ) { float4 OutDiffuse; if ( !gLighting ) { // If lighting render state is off, pass through the vertex color OutDiffuse = InDiffuse; } else { // If lighting render state is on, calculate diffuse color by doing what D3D usually does float4 ambient = gAmbientMaterialSource == 0 ? gMaterialAmbient : InDiffuse; float4 diffuse = gDiffuseMaterialSource == 0 ? gMaterialDiffuse : InDiffuse; float4 emissive = gEmissiveMaterialSource == 0 ? gMaterialEmissive : InDiffuse; OutDiffuse = gGlobalAmbient * saturate( ambient + emissive ); OutDiffuse.a *= diffuse.a; } return OutDiffuse; } //------------------------------------------------------------------------------------------ // VertexShaderFunction //------------------------------------------------------------------------------------------ PSInput VertexShaderFunction(VSInput VS) { PSInput PS = (PSInput)0; // Vertex in world position float4 wPos = mul(float4(VS.Position, 1), gWorld); wPos.xyz += sWorldOffset; // Create view matrix float4x4 sView = createViewMatrix(sCameraPosition, sCameraForward, sCameraUp); float4 vPos = mul(wPos, sView); vPos.xzy += sElementOffset; // Create projection matrix float sFarClip = gProjectionMainScene[3][2] / (1 - gProjectionMainScene[2][2]); float sNearClip = gProjectionMainScene[3][2] / - gProjectionMainScene[2][2]; float4x4 sProjection = createProjectionMatrix(sNearClip, sFarClip, sFov, sAspect, sMoveObject2D, sScaleObject2D); PS.Position = mul(vPos, sProjection); PS.Position.z *= 0.00625 * sProjZMult; // Pass through tex coord PS.TexCoord0 = VS.TexCoord0; // Calculate GTA lighting float Diffa = MTACalcGTABuildingDiffuse(VS.Diffuse).a; PS.Diffuse = float4(0.35, 0.35, 0.3, Diffa); return PS; } //--------------------------------------------------------------------- // Structure of color data sent to the renderer ( from the pixel shader ) //--------------------------------------------------------------------- struct Pixel { float4 Color : COLOR0; // Render target #0 float4 Extra : COLOR1; // Render target #1 }; //------------------------------------------------------------------------------------------ // PixelShaderFunction //------------------------------------------------------------------------------------------ Pixel PixelShaderFunction(PSInput PS) { Pixel output; // Get texture pixel // float4 texel = tex2D(Sampler0, PS.TexCoord0); // OBJECT TEXTURE float4 texel = tex2D(newTextureSampler, PS.TexCoord0); // CUSTOM TEXTURE // Main render target (just so the secondary one works) output.Color = float4(0, 0, 0, min(min(texel.a, 0.006105), sAlphaMult)); // Apply texture and multiply by vertex color float4 finalColor = texel * PS.Diffuse; // Secondary render target output.Extra = saturate(finalColor); output.Extra.a *= sAlphaMult; return output; } //------------------------------------------------------------------------------------------ // Techniques //------------------------------------------------------------------------------------------ technique fx_pre_object_MRT { pass P0 { FogEnable = false; AlphaBlendEnable = true; AlphaRef = 1; SeparateAlphaBlendEnable = true; SrcBlendAlpha = SrcAlpha; DestBlendAlpha = One; VertexShader = compile vs_2_0 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } // Fallback technique fallback { pass P0 { // Just draw normally } }
  8. You cannot replace the model. Only texture. Below these links you can find the identifiers for replacing the texture. And if this is not enough for you, you can use the shader to replace the texture. https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs https://wiki.multitheftauto.com/wiki/CJ_Clothes
  9. XaskeL

    AC Detect 33

    33 SD. Disallow software of the category 'Net limiter' (ideal for lagswitching or causing structural lag, but may also be used for benign purposes). While working on notifications about non-standard GTA San Andreas. Noticed that I have AC Detect # 33. But I did not install any of the programs listed here (https://updatesa.mtasa.com/sa/trouble/?tr=netlimiter). GIGABYTE Aorus motherboard. Maybe there are some other programs that need to be removed or not?
  10. If I had a resource, then it would be possible to test. And so, most likely, you will have to create weapon objects separately and synchronize the paintjob for each player to an individual weapon object.
  11. This is a simple dxGUI library. With the ability to describe your interface in a table. The library has just begun its development and, I would like you to participate in its development too. The idea behind this is that the library can be easily exported via loadstring and used in your code. Also, have a minimum set of functions and a minimum of code to implement a simple interface. Plans for further changes: 1. Come up with local and global functions as well as rename old functions. (for the entire style sheet or for an object in the interface table). 2. Change synchronization in style sheets, object table and interface table with sorted table. 3. Simplify the code. e.g styles. 4. Add simple animations like fade window and so on. Link: https://github.com/XaskeL/SimpleUI/ #Wiki: 1. return index = baseUI.Construction(index, dx, dy, position, gui) — index: Name of The name of your interface table (must be unique). — dx,dy: Developer screen resolution. (the one who constructs the interface). — position: Position in the table. This type: { x = 0; y = 0; w = 0; h = 0; } — gui: Here you describe your objects. Also in the table with records. { p = LAYER_NUMBER (1..N), type = 'OBJECT TYPE', x = 0, y = 0, w = 0, h = 0, color = tocolor(255, 255, 255, 255) }; Example: background = { p = 1, type = 'image', x = 0, y = 0, w = 740, h = 638, image = 'assets/images/background.png', color = WHITE }; { p = 2, type = 'image', x = 20+(160-82)/2, y = 60+15, w = 82, h = 70, image = 'assets/images/icons/1.png', color = WHITE }; 2. return table = baseUI.GetScale(index); — Returns a size table with a resolution difference. local scale = baseUI.GetScale(UI); 3. baseUI.SetScale(index, scale.x, scale.y); — sets the size of items relative to the screen. 4. baseUI.SetAlign(index, 'center', 'center'); — sets the position of the interface relative to the position on the screen: left, top, bottom, right
  12. От начала движения получить время getTickCount() в миллисекундах. Потом при наборе скорости в км/ч от 0-100, до 100-200 получать так же время как в начале пути а после элементарно высчитать вычитанием. Скорость можно высчитать так: local speed = getDistanceBetweenPoints3D ( 0, 0, 0, getElementVelocity ( vehicle ) ) * 180 -- либо так local speed = localPlayer.vehicle.velocity.length * 180; А 1/4 мили (402 метра) все тоже самое но уже посредством получения точки старта и getDistanceBetweenPoints2D получить расстояние. Думаю внятно объяснил.
  13. XaskeL

    Custom radar

    Example "hud mask": https://wiki.multitheftauto.com/wiki/Shader_examples