Jump to content

Desaster

Members
  • Posts

    243
  • Joined

  • Last visited

Everything posted by Desaster

  1. Desaster

    Farmer

    this is the beginning of a script i am posting it for my friend I can't find why it don't work local createTeam ( "farmer", 0, 255, 0 ) local Marker = createMarker ( 670.69952392578, 906.75018310547, -40.3984375, "cylinder", 1, 255, 255, 255, 0 ) local Elem = createObject ( 3409, 670.69952392578, 906.75018310547, -40.3984375, 90, 0, 0 ) function onmarkethit() if ( weapon == 23 ) then destroyElement ( Elem ) destroyElement ( Marker ) givePlayerMoney ( source, 5000 ) end else end
  2. thank you a lot works perfectly
  3. hello I was working on a script made by orange... so I wanted to bind u with making the screen full of blur motion but idk how to make it work without moving my camera now work good but only if I move my camera if i stand not doing anything it won't do anything help me pls and thnx for reading this local w, h = guiGetScreenSize( ); local x1, y1, z1 = getCameraMatrix() local sx1, sy1 = getScreenFromWorldPosition(x1, y1, z1) local enable = false; addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), function( ) bindKey( "u", "up", enableBlackWhite ); end ) function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + t end; return t; end function renderEffect( ) local x2, y2, z2 = getCameraMatrix() local d = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2); sx2, sy2 = w/2, h/2 local dx = x1 - x2 local dy = y1 - y2 local dz = z1 - z2 if getPedOccupiedVehicle(getLocalPlayer()) then multiplier = 0.0010 else multiplier = 0.0010 end dxSetShaderValue( screenShader, "BlurAmount", d*multiplier ); dxSetShaderValue( screenShader, "Angle", findRotation(dx, dx, dx, dz)) -- Fail code, but gives a nice effect dxSetRenderTarget(); dxUpdateScreenSource( screenSrc ); dxDrawImage( 0, 0, w, h, screenShader ); x1, y1, z1 = getCameraMatrix() end function enableBlackWhite( ) enable = not enable; if enable then outputChatBox("Motion Blur Enabled") screenShader = dxCreateShader( "motion.fx" ); screenSrc = dxCreateScreenSource( w, h ); if screenShader and screenSrc then dxSetShaderValue( screenShader, "ScreenTexture", screenSrc ); addEventHandler( "onClientHUDRender", getRootElement( ), renderEffect ); end else if screenShader and screenSrc then outputChatBox("Motion Blur Disabled") destroyElement( screenShader ); destroyElement( screenSrc ); screenShader, screenSrc = nil, nil; removeEventHandler( "onClientHUDRender", getRootElement( ), renderEffect ); end end end and the FX file texture ScreenTexture; float Angle = 0; // Defines the blurring direction float BlurAmount = 0.001; // Defines the blurring magnitude sampler ImageSampler = sampler_state { Texture = <ScreenTexture>; }; float4 main( float2 uv : TEXCOORD) : COLOR { float4 output = 0; // Defines the output color of a pixel float2 offset; // Defines the blurring direction as a direction vector int count = 24; // Defines the number of blurring iterations //First compute a direction vector which defines the direction of blurring. // This is done using the sincos instruction and the Angle input parameter, // and the result is stored in the offset variable. This vector is of unit // length. Multiply this unit vector by BlurAmount to adjust its length to // reflect the blurring magnitude. sincos(Angle, offset.y, offset.x); offset *= BlurAmount; // To generate the blurred image, we // generate multiple copies of the input image, shifted // according to the blurring direction vector, and then sum // them all up to get the final image. for(int i=0; i<count; i++) { output += tex2D(ImageSampler, uv - offset * i); } output /= count; // Normalize the color return output; }; technique MotionBlur { pass P1 { PixelShader = compile ps_2_0 main(); } }
  4. I also wanna know how make that exported function
  5. still don't work (I tryed it also before ) but I don't know why more errors appear WARNING: c\server.lua:4: Bad argument @ 'getPlayerWantedLevel' ERROR: c\server.lua:4: attempt to compare number with boolean Hey is the triggered event right ??
  6. what do you mean with that it is fully made by me
  7. hello it's agin me I have tryed to trigger a server event in a client resource to set wanted level but idk why it wont wor and this error appear : Bad Argument @ setPlayerWantedLevel pls help me I tryed so much thing but nothing has helped the script work just the park when your wanted level must be set to 0 is broken CODE REMOVED
  8. Desaster

    timer help

    I have made my first script and need some help my problem is to intergrate a timer into my script as I can set a timer than the player will be freezed than warped to my definied position but what my current script make is warp my player to postion than freese it than unfreese also i wanna make a limitb if one has >5000 only he can use /para it pls tell how it work and tell me my faults in my script Client side : function chadi ( commandName ) setElementFrozen ( getLocalPlayer(), true ) setElementPosition ( getLocalPlayer(), 1544.0194091797, -1352.6119384766, 329.47549438477 ) setElementFrozen ( getLocalPlayer(), false ) takePlayerMoney ( 5000 ) end addCommandHandler ( "para", chadi )
  9. Desaster

    double side

    I need a script which make all objects in a map double sided - thanks
  10. Desaster

    ACL rights

    I have a resouce for filying cars and I wanna allow the function /fly only for admin how to do that in the ACL ??
  11. Desaster

    Turfs

    I need a turf resource for my server pls give me a good one not hole shit - thanks desaster
×
×
  • Create New...