Yamamoto
-
Posts
7 -
Joined
-
Last visited
Posts posted by Yamamoto
-
-
19 hours ago, Kelly003 said:
I want to export a function that rotates the object, this is what the function looks like:
function rotateobj()local orx, ory, orz = getElementRotation(obj)setElementRotation(obj, orx, ory, orz+1)endaddEventHandler("onClientRender", root, rotateobj)
and i want to export this function to another script and i don't know how to do it i tried to do something but i can't get it
local obj = createObject(1947, 193.71983, -105.13480, 1.54872-1) exports["rotobj"]:rotateobj()
first you need to add the variable in your function
function rotateobj(obj) local orx, ory, orz = getElementRotation(obj) setElementRotation(obj, orx, ory, orz+1) end
and then export
local obj = createObject(1947, 193.71983, -105.13480, 1.54872-1) exports["rotobj"]:rotateobj(obj)
-
Is there a way to make a normal vehicle have the properties of a tank? when another vehicle hits you, don't stop it or exploit yourself directly
-
- 1
-
which way is more efficient for a trigger
triggerClientEvent(root, "....", root) or for k, player in ipairs(getElementsByType("player")) do triggerClientEvent(player, "....", player) end
-
Is it possible to combine these two shaders so that a black and white blur comes out?
texture texture0; float factor; sampler Sampler0 = sampler_state { Texture = (texture0); AddressU = MIRROR; AddressV = MIRROR; }; struct PSInput { float2 TexCoord : TEXCOORD0; }; float4 PixelShader_Background(PSInput PS) : COLOR0 { float4 sum = tex2D(Sampler0, PS.TexCoord); for (float i = 1; i < 3; i++) { sum += tex2D(Sampler0, float2(PS.TexCoord.x, PS.TexCoord.y + (i * factor))); sum += tex2D(Sampler0, float2(PS.TexCoord.x, PS.TexCoord.y - (i * factor))); sum += tex2D(Sampler0, float2(PS.TexCoord.x - (i * factor), PS.TexCoord.y)); sum += tex2D(Sampler0, float2(PS.TexCoord.x + (i * factor), PS.TexCoord.y)); } sum /= 9; sum.a = 1.0; return sum; } technique complercated { pass P0 { PixelShader = compile ps_2_0 PixelShader_Background(); } } technique simple { pass P0 { Texture[0] = texture0; } }
// // blackwhite.fx // texture screenSource; sampler TextureSampler = sampler_state { Texture = <screenSource>; }; float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0 { float4 color = tex2D(TextureSampler, TextureCoordinate); float value = (color.r + color.g + color.b) / 3; color.r = value; color.g = value; color.b = value; return color; } technique BlackAndWhite { pass Pass1 { PixelShader = compile ps_2_0 PixelShaderFunction(); } }
comprar objeto una sola vez hasta que lo termine?
in Scripting
Posted