Jump to content

Rolplay

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Rolplay

  1. A question about the first: i need to create this 4 event at client side, and if i created, then i need to call this events with triggerClientEvent on server side?
  2. I have the same problems now, i try to copy functions of @#\_oskar_/# 's script but my script is very different from it. I have this problems now: All players in the car can use the indicator(i binded the function to mouse1 and mouse2) Only visible for the localPlayer. If i use indicator on a car, all spawned cars turn on indicators.
  3. I don't think so, thats the point of the script.
  4. Don't work for me :=( i try to copy getPedOccupiedVehicle, but i can't. I think i need to use getPedOccupiedVehicle function, but now i dont know how to.
  5. I didn't find any solving for this two: how to synchronize the indicator lights across multiple game clients? (medium) how to allow indicator lights for each vehicle separately? (hard) Can you give me a hint again please?
  6. I'm done with blinking, your hint was very helpful . I have a little problem with separated indicator light, but i try to make it
  7. I should make the blinking with a timer? I mean like this: if (indicator_right_on) then local passed_time_ms = now - indicator_right_start; local period = 1 - math.floor(( passed_time_ms / indicator_blink_duration_ms ) % 2); dxSetShaderValue(shader_right, "intensity", 1); setTimer ( period, 500, 0,0) end
  8. Thanks for helping me out! I try to make this exercieses, and if i finished,i put a video here of the final version.
  9. local vehicleTXD = engineLoadTXD("skodafinal.txd"); engineImportTXD(vehicleTXD, 597); myShader = dxCreateShader( "indicatorshader.fx" ) local vehicleDFF = engineLoadDFF("skodafinal.dff", 597); engineReplaceModel(vehicleDFF, 597); local shader = dxCreateShader("indicatorshader.fx"); outputChatBox("Loaded indicator lights shader and car model!"); function bindTurnIndicators(player) bindKey(player, "mouse1", "down", "vehicle_left") bindKey(player, "mouse2", "down", "vehicle_right") end for m,n in ipairs(getElementsByType("vehicle")) do if (getElementModel(n) == 597) then engineApplyShaderToWorldTexture(shader, "p", n); engineApplyShaderToWorldTexture(shader, "l", n); end end function vehicle_left dxSetShaderValue(myShader, "intensity", 1); end function vehicle_left dxSetShaderValue(myShader, "intensity", 0); end This is my Lua now. But i have an error: https://imgur.com/MI7v97c texture Tex0; float4x4 World; float4x4 View; float4x4 Projection; float4x4 WorldViewProjection; float Time; float intensity; sampler Sampler0 = sampler_state { Texture = (Tex0); }; struct VSInput { float3 Position : POSITION; float4 Diffuse : COLOR0; float2 TexCoord : TEXCOORD0; }; struct PSInput { float4 Diffuse : COLOR0; float2 TexCoord : TEXCOORD0; }; struct VSOutput { PSInput psInput; float4 Position : POSITION; }; VSOutput PassthroughVS(VSInput input) { VSOutput output; output.psInput.Diffuse = input.Diffuse; output.psInput.TexCoord = input.TexCoord; //-- Transform vertex position (You nearly always have to do something like this) output.Position = mul(float4(input.Position, 1), WorldViewProjection); return output; } float4 IndicatorMultiply(PSInput input) : COLOR0 { return float4(1, 1, 0, 1); } technique indicators { pass P0 { VertexShader = compile vs_2_0 PassthroughVS(); PixelShader = compile ps_2_0 IndicatorMultiply(); } }; And this is my shader now, i only add "float Intensity" string.
  10. I checked it with texture name shader. "p" is hte right , and "l" is the left indicator
  11. That's didn't work for me: https://imgur.com/a/SH1BEWw I try that, with an another model, an it worked. Thanks for helping!! Can i bind that to right and left click?
  12. Thanks, i try this currently. I need to export "p" and "l" from the police txd, or the script find it and use it on landstalker?
  13. I didn't heard about HLSL. Can you show me an example please? I want to make like this:
  14. Hi! I downloaded a mod, which have working indicator textures. This is the mod: https://www.gtainside.com/en/sanandreas/cars/139425-audi-a6-avant-2019-magyar-rend-rs-g/ That have a turned on .tga file ( named "p" and "l") on the tga file. The question: how can i use them? I mean, if i click on the right, the car turn on his right indicator.
  15. Hello there. I want to made a script for my own fun server. I want to color black the exhaust fumes of diesel cars. That's possible?
×
×
  • Create New...