• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Sylvek

  • Rank


  • Gang
  • Location
  • Occupation
  • Interests
    Drugs, Money and Girls.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi. I have a problem with setSoundProperties function. When I change pitch of some sound, it changes but with a little but really annoying lag. What I mean? I mean when sound has default pitch(0) it sounds normal but when I try to change pitch to f.e. 10,. pitch does change but sound has to wait before I hear it has changed pitch. I don't know if it's MTA side bug or I am doing something wrong. Just want to change pitch dynamically and immediately and I am wondering where's the fault?
  2. Hello! I'd like to create my own colorpicker. Just made moving pointer function which was easy but I am writing this topic because there's another worse problem :/. I want to calculate position of this pointer when I enter hex color code to editbox which will be converted to R,G,B and pointer will get updated position by these rgb. I think there's some type of pattern for this function. I know I can just create big loop for about 250.000 pixels but it sounds really stupid. Here's a screen if you need it:
  3. Wow. Really clever and simple. Really thanks. I think we can close this topic. For close.
  4. Hi! Last time I scripted some gps script and it works really nice with nodes from default gps resource. Used this in map script where you can easily zoom and move around san andreas then just select waypoint for gps. Main issue is quality of drawed lines on path. I found on it some "bad pixels?" and another quality losses. Just take a look at this: You can easily see some type of jagged edges. You can now say that's the bend problem but on straight lines you can see this problem too. From script side line is drawed on renderTarget then drawed with imageSection on map gui. Its just the line. Converting this to texture and using any color type or mipmaps doesnt work. I think shader will be good idea but which type?
  5. Problem solved. For close.
  6. Hi! I'd like to spawn vehicle on road but Can't find any usefull function which could help me I think there's possibility to do this. For example NFS:SA has a respawning vehicle on roads. I think can use this table but don't know how to get the nearest position to the positions from table. Table:
  7. Hi! I have little problem with texture shad_car. I'd like to apply shader on it but I'd like to get shader only on predefined elements. F.e. apply shader only on one vehiclea. bool engineApplyShaderToWorldTexture ( element shader, string textureName [, element targetElement = nil, bool appendLayers = true ] ) As you can see. Third argument is targetElement. On applying some "vehicle" shader is really easy (vehiclegrunge256, vehiclegeneric, etc.) but problem with applying shader on shad_car is that targetElement can't be a vehicle - it's just not working. Can I make this in another way or it's impossible to apply this shader with targetElement? a
  8. There can be more data.
  9. I am not at computer at this moment but it's like that: local result = exports(DB,dbQuerry(select * from table where owner = ?,owner)
  10. I am doing like you say. local result = exports(dbquerry) etc. And doing loop like this For i,v in pairs(result) do
  11. Hi! I scripted function that makes loop which gets result from MySQL and put this to gridlist. It's like refresh button which loads items for sale. Problem is that one use of this button take about 0.25% server CPU usage. Bigger problem is that I can spam this button and it takes about 10% of server cpu usage. Don't know if it's normal or too high. Could you help me and say how to decrease this and it's normal?
  12. Sylvek

    bugged shader ?

    Hi ! Last day I created script which is applying shaders "onClientResourceStart" for all vehs where elementData(vinyl:id). All were working till I had to reconnect then all vehs didn't load any shader ( I mean texture on vehiclegrunge256 ). I think its script need to restart but it isnt. I have to restart mta to again see all applied shaders. I can add that after reconnect I cant see a texture named "vehiclegrunge256" in list of nearby textures. Starting code function onStart22() renderVinyles() end addEventHandler("onClientResourceStart",resourceRoot,onStart22) function Render1Winyl(vinyl,veh,txt2) if vinyl > 0 and vinyl <= 7 then local vinyl = tonumber(vinyl) local shader = dxCreateShader("shader.fx") local Texture = dxCreateTexture ("txt"..vinyl..".png") dxSetShaderValue(shader,"TEXTURE_REMAP",Texture) engineApplyShaderToWorldTexture(shader, txt2, veh) end end addEvent("renderONE",true) addEventHandler("renderONE",resourceRoot,Render1Winyl) no errors in db3.