• Content Count

  • Joined

  • Last visited

Everything posted by ShayF

  1. ShayF


    You can use a youtube api converter to convert youtube videos into mp3 files, however generally these api's only convert music videos. To do this you'd need to do whats called string parsing. Where you take the youtube url and change the string a bit to match what the api needs in order to work, these api's are called web api's and can be used using fetchRemote however it is not ideal because it requires each player to verify access to the url. Alternatively you can use/make your own api with something like nodejs that I don't know much about, but it is a faster, more flexible alternative. There is one other way that doesn't require api's or verifying urls, you can run a browser to a youtube link to play the sound however you'd have to find some way to sync it up with other players and also check the distance between the player or where you created the sound and the elements around it for that 3d effect. I hope this helped, good luck to you mate.
  2. Try enabling the scrolling feature when you have more items than you can display on the scoreboard.
  3. Find a cool loading gif on the internet and load it in with dx. Should work out alright, or you can try my dx library which has a progress bar in it. Let me know if you have any other questions.
  4. You can try this community script shader example that gives you texture names.
  5. Sure mate, hit me up ShayF#0259, I'd be willing to help you out.
  6. ShayF


    If you'd like you can try my dx library. It's available to download for free from github, modify it how you please. You can also ask me questions personally if you have any issues or want help with something.
  7. Use processLine to find the target, time the collision, disable and re-enable collisions for the target at the time the projectile will hit it.
  8. I've been away from MTA for quite some time, probably close to 6 months. I decided to pick up where I left off on one of my projects called Vehicle Manipulation. This project is in efforts to allow any modification at all to the car. So far, all I've done is the wheels and greatly greatly improved the whole concept of attaching objects. In these images, the wheels are cambered, resized, width changed, and they are spaced away from the vehicle. All of which is fully customizable, let me know your thoughts. If I should continue or not. Plans: Animate windows, animate wiper blades, animate steering wheel, animate pedals, animate shifters, animate radios, design an actually realistic shifting system, improve textures, and use processLine to pick up items from the ground and put them on the vehicle or inside the vehicle.
  9. How would I find the offset between element position and the same elements rotation? Like, a player, how would I keep an object to the left of the player when the player rotates?
  10. fiyatt is read as unable to read, which means that the element data 'fiyat' either doesn't exist or just isn't working.
  11. ShayF

    Dx Gui Help

    local sx,sy = guiGetScreenSize() local sw,sh = 1366,768 function toRelative(x,y,w,h) return x/sw*sx,y/sh*sy,w/sw*sx,h/sh*sy end local x,y,w,h = toRelative(400,500,200,300)-- use absolute values here.
  12. ShayF

    dbConnect help

    I have no idea what it is that you mean. Explain more. Show the problem.
  13. Using predefined variables would dramatically decrease your code size. for getResourceRootElement() just use resourceRoot, its a predefined variable that is the resource root, and for getRootElement() just use root, which is a predefined variable for the root element. --This addEventHandler('onClientRender',getRootElement(),function() end) addEventHandler('onResourceStart',getResourceRoot(getThisResource()),function() end) -- vs this, what i'm talking about addEventHandler('onClientRender',root,function() end) addEventHandler('onResourceStart',resourceRoot,function() end)
  14. setElementFrozen(localPlayer,true)
  15. ShayF


    I plan on making a roleplay server, very similar to gta online. In fact that's what I'm naming the gamemode. I really want a specific map in the server, hence why I am here. I need a specific person to help me with this. His name is CodyL. He's famous for converting gta sa maps to mta. That's exactly what i need done in order to progress. This is the map I want.
  16. I made this simple script for freeroam servers. This lets you change the color of a players vehicle. Either with command or gui. I hope you enjoy (Server-sided only! NOT TESTED!) server.lua - local command = 'vehcolor' function vehColor(element,_,r,g,b) if getElementType(element) == 'player' then local v = getPedOccupiedVehicle(element) if v then if getVehicleOccupant(v,0) == element then vehicle = v end end elseif getElementType(element) == 'vehicle' then vehicle = element end if vehicle then if r then if g then if b then if tonumber(b) then setVehicleColor(vehicle,tonumber(r),tonumber(g),tonumber(b)) end else if tonumber(g) then setVehicleColor(vehicle,tonumber(r),tonumber(g),0) end end else if tonumber(r) then setVehicleColor(vehicle,tonumber(r),0,0) end end else setVehicleColor(vehicle,0,0,0) end end end addEvent('setVehicleColor',true) addEventHandler('setVehicleColor',root,vehColor) addCommandHandler(command,vehColor) --[[ Event Triggers triggerEvent('setVehicleColor',root,vehicle,_,r,g,b) triggerServerEvent('setVehicleColor',root,vehicle,_,r,g,b) triggerEvent('setVehicleColor',root,player,_,r,g,b) triggerServerEvent('setVehicleColor',root,player,_,r,g,b) ]]
  17. ShayF


    Contact me on any method I provided, I will consider helping you.
  18. ShayF


    Would you help me make this phone?
  19. ShayF


    My name is Shaio Fencski, I'm 16 years old, I live in the United States. I've been scripting on MTA for about 5 years, I'm decently good. I would like to form a scripting team. Anyone willing to join in, I am starting a project, making a Mobile phone for MTA. This phone is better than any other in MTA. I'll list below the planned functions for the phone. I'll give my Contact Information Below.
  20. Never Mind, I made the script. Enjoy.
  21. I'm trying to change the color of a vehicle upgrade object. ID: 1001, name: spl_b_bab_m.dff. TXD not present. This is a spoiler. It changes the alpha and shade. However it only seems to toggle between white/grey and black. I need help with this. client.lua addEventHandler('onClientResourceStart',resourceRoot,function() shader = dxCreateShader('shader.fx',0,0,false,'object') setTimer(function() for i,v in pairs(getElementsByType('vehicle')) do if isElementStreamedIn(v) then local r,g,b = getVehicleColor(v) local a = getElementAlpha(v) dxSetShaderValue(shader,"red",(tonumber(r)/255)) dxSetShaderValue(shader,"green",(tonumber(g)/255)) dxSetShaderValue(shader,"blue",(tonumber(b)/255)) dxSetShaderValue(shader,"alpha",(tonumber(a)/255)) for _,attached in ipairs(getAttachedElements(v)) do local model = getElementModel(attached) if (model == 1001) then engineApplyShaderToWorldTexture(shader,'*',attached) end end end end end,50,0) end) shader.fx float red; float green; float blue; float alpha; technique simple { pass P0 { MaterialAmbient = float4(red,green,blue,alpha); } } meta.xml <meta> <script src="client.lua" type="client"/> <file src="shader.fx"/> <file src="mta-helper.fx"/> </meta> Alpha Change Shades Change (Normal is black)