-
Posts
1,673 -
Joined
-
Last visited
-
Days Won
6
Everything posted by 0xCiBeR
-
Do you know the ID of the explsions efect?
-
I made it server side-Did you switch the type in the meta?
-
u can "edit" the particle.txd only with shader funtion. Example?
-
addEventHandler('ResourceStart',resourceRoot, function () Shocking1() end ) function Shocking1() for i,v in ipairs(getElementsByType("player")) do setTimer ( function ( ) local anim = {getPedAnimation( v )} if getElementHealth ( v ) <= 20 then if not ( anim[1] == "crack" and anim[2] =="crckidle1" ) then setPedAnimation ( v, "crack", "crckidle1", -1, true, true, false ) end else if ( anim[1] == "crack" and anim[2] == "crckidle1" ) then setPedAnimation( v, false) end end end,500,0 ) end end It would be something like that,.Im from my cell, Maybe wrong somewhere,Try it..Anyway there are event handlers a bit strange there...Is it your script?
-
Well whats the problem there?
-
function LowBloodAnim(sourcePlayer) local getplayer = getPlayerName(sourcePlayer) if getElementHealth ( sourcePlayer ) <= 20 then if not ( anim[1] == "crack" and anim[2] =="crckidle1" ) then setPedAnimation ( sourcePlayer, "crack", "crckidle1", -1, true, true, false ) end end end addCommandHandler ( "anim", LowBloodAnim )
-
He is asking, how does that function execute..? With command? event?..Etc.. EDIT: You must define sourcePlayer.. Example: function say (sourcePlayer) end addCommandHandler ( "hello", say )
-
Anyone knows how to replace the particle.txd in mta?.. Whats the ID and the functions for that?
-
Alguien sabe la id para reemplazar el particle.txd, que contiene los efectos de explosiones y demas dentro del mta?..Gracias
-
Generalmente los provedores de hosting de MTA de a poco van añadiendo paquetes de actualizacion como en Vortex servers..Si usas un dedicado, puedes hacerlo manualmente metiendo el comando "upgrade" seguido de la version nueva..en la consola
-
How to make this Shell on a player last until i cancel de efect, and how do i make my shell visible for everyone when i activate it?..Thx Lua: -- -- c_ped_shell.lua -- local myShader local startTickCount = 0 addEventHandler( "onClientResourceStart", resourceRoot, function() -- Version check if getVersion ().sortable < "1.3.1-9.04939" then outputChatBox( "Recurso incompatible" ) outputChatBox( "Actualiza MTA." ) return end -- Create shader myShader, tec = dxCreateShader ( "fx/ped_shell_layer.fx", 0, 0, true, "ped" ) if not myShader then outputChatBox( "Could not create shader. Please use debugscript 3" ) else -- Apply shader to local player engineApplyShaderToWorldTexture ( myShader, "*", localPlayer ) -- Hack to make GTA render the ped last, so our shell effect appears on top of the background setElementAlpha( localPlayer, 254 ) -- Fire effect at startup startEffect(); end end ) ---------------------------------------------------------------- -- Start effect here ---------------------------------------------------------------- function startEffect() startTickCount = getTickCount() end bindKey("m", "down", startEffect ) ---------------------------------------------------------------- -- Update effect here ---------------------------------------------------------------- addEventHandler( "onClientRender", root, function() if not myShader then return end local timeElapsed = getTickCount() - startTickCount local f = timeElapsed / 750 f = math.min( f, 1 ) local alpha = math.lerp ( 1.0, 0.0, f ) local size = math.lerp ( 0, 0.3, f ) -- Expand shell dxSetShaderValue( myShader, "sMorphSize", size, size, size ) -- Fade out shell dxSetShaderValue( myShader, "sMorphColor", 255, 0, 0, alpha ) end ) ---------------------------------------------------------------- -- Math helper functions ---------------------------------------------------------------- function math.lerp(from,to,alpha) return from + (to-from) * alpha end Shader-Side // // Example shader - ped_shell_layer.fx // //--------------------------------------------------------------------- // Ped shell settings //--------------------------------------------------------------------- float3 sMorphSize = float3(0,0,0); float4 sMorphColor = float4(1,1,1,1); //--------------------------------------------------------------------- // Include some common stuff //--------------------------------------------------------------------- #include "mta-helper.fx" //--------------------------------------------------------------------- // Structure of data sent to the vertex shader //--------------------------------------------------------------------- struct VSInput { float3 Position : POSITION0; float3 Normal : NORMAL0; float4 Diffuse : COLOR0; float2 TexCoord : TEXCOORD0; }; //--------------------------------------------------------------------- // Structure of data sent to the pixel shader ( from the vertex shader ) //--------------------------------------------------------------------- struct PSInput { float4 Position : POSITION0; float4 Diffuse : COLOR0; float2 TexCoord : TEXCOORD0; }; //------------------------------------------------------------------------------------------ // VertexShaderFunction // 1. Read from VS structure // 2. Process // 3. Write to PS structure //------------------------------------------------------------------------------------------ PSInput VertexShaderFunction(VSInput VS) { PSInput PS = (PSInput)0; // Do morph effect by adding surface normal to the vertex position VS.Position += VS.Normal * sMorphSize; // Calculate screen pos of vertex PS.Position = MTACalcScreenPosition ( VS.Position ); // Pass through tex coords PS.TexCoord = VS.TexCoord; // Set our custom morph color PS.Diffuse.rgb = sMorphColor.rgb * sMorphColor.a; PS.Diffuse.a = 1; return PS; } //------------------------------------------------------------------------------------------ // Techniques //------------------------------------------------------------------------------------------ technique tec0 { pass P0 { // As this shader is used as a separate layer, we just have to draw our effect // and not worry about the main rendering // SrcBlend and DestBlend can be set for various effects // This combination gives a translucent look SrcBlend = SrcColor; DestBlend = One; VertexShader = compile vs_2_0 VertexShaderFunction(); } } // Fallback technique fallback { pass P0 { // As this shader is used as a separate layer, don't draw anything SrcBlend = Zero; DestBlend = One; } }
-
Ahh ya entendiiii.. Con ese script solo me esta aplicando el shader a mi no?..
-
lol no entendi nada me lo explicas mejor ?
-
Pero como hago que los demas vean mi aura cuando la activo?
-
Descague un recurso de auras de la wiki... El problema es que : 1-) cuando acciono la aura con la tecla M, no se mantiene prendida.. 2-)los demas jugadores no ven mi aura... Aca los archivos -- -- c_ped_shell.lua -- local myShader local startTickCount = 0 addEventHandler( "onClientResourceStart", resourceRoot, function() -- Version check if getVersion ().sortable < "1.3.1-9.04939" then outputChatBox( "Recurso incompatible" ) outputChatBox( "Actualiza MTA." ) return end -- Create shader myShader, tec = dxCreateShader ( "fx/ped_shell_layer.fx", 0, 0, true, "ped" ) if not myShader then outputChatBox( "Could not create shader. Please use debugscript 3" ) else -- Apply shader to local player engineApplyShaderToWorldTexture ( myShader, "*", localPlayer ) -- Hack to make GTA render the ped last, so our shell effect appears on top of the background setElementAlpha( localPlayer, 254 ) -- Fire effect at startup startEffect(); end end ) ---------------------------------------------------------------- -- Start effect here ---------------------------------------------------------------- function startEffect() startTickCount = getTickCount() end bindKey("m", "down", startEffect ) ---------------------------------------------------------------- -- Update effect here ---------------------------------------------------------------- addEventHandler( "onClientRender", root, function() if not myShader then return end local timeElapsed = getTickCount() - startTickCount local f = timeElapsed / 750 f = math.min( f, 1 ) local alpha = math.lerp ( 1.0, 0.0, f ) local size = math.lerp ( 0, 0.3, f ) -- Expand shell dxSetShaderValue( myShader, "sMorphSize", size, size, size ) -- Fade out shell dxSetShaderValue( myShader, "sMorphColor", 255, 0, 0, alpha ) end ) ---------------------------------------------------------------- -- Math helper functions ---------------------------------------------------------------- function math.lerp(from,to,alpha) return from + (to-from) * alpha end Y el shader: Gracias no entiendo muchode shaders
-
lol that program is only german..Use Google translate
-
lol i said to set the radar areas alpha to 0..
-
Acuerdate de ejecutar un timer, para cambiar de cancion
-
Aun desarrollan el evento que se trigea cuando algo entra al agua..Por lo pronto, por ahora solo podes comprobar si un elemento esta en el agua con la funcion que te dio @Alvare_z + la funcion de @WzM ... Estate atento a las actualizaciones De MTA.
-
Nuhu, I'd rather use a couple colshapes instead of adding hundreds of spawnpoints. Colshapes are not the ones that are zombieProof,Any way, Create big radar areas, and restart your zombie resource so that the new zombie-proof areas are inserted into the tables...And well thats about it, you can make them invisible setting the alfa to 0 .. Any other thing just say so
-
Pues deberias usar getElementVelocity y getPedOccupiedVehicle ..setElementVelocity seria para establecer la velocidad del carro... No se de que te serviria..
-
limoVehicles = { [409]=true } limoSkins = { [255]=true } function limoenterVehicle ( player, seat, jacked ) local clan = getPlayerTeam ( player ) local clanPermitido = "Admin" local clannombre = getTeamName ( clan ) if ( limoVehicles[getElementModel ( source )] ) and (clannombre == clanPermitido) and ( seat == 0 ) then cancelEvent () outputChatBox ( "Este vehículo no es de tu trabajo.", player ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), limoenterVehicle ) Algo asi seria, cambie tu evento a onVehicleStartEnter para cancelar la entrada si no sos del team.. No esta probado..Dime si funciona y si no avisame del error