ShayF

Members
  • Content count

    194
  • Joined

  • Last visited

  • Days Won

    1

ShayF last won the day on January 11

ShayF had the most liked content!

Community Reputation

45 Good

2 Followers

About ShayF

  • Rank
    Mark

Details

  • Gang
    Grove
  • Location
    Grove St
  • Occupation
    Drifting
  • Interests
    Scripting

Recent Profile Visitors

1,336 profile views
  1. Hello everyone, my name is Shaio Fencski. The first server that I joined was John Flowers Freeroam Boredom. This server had professional scripters, such as Offroader23 who made the first airbrake and offedit in-game map editor, Woovie who is an MTA administrator, and also John Flower himself. They had a special script called flowerattach, where you could attach objects to your vehicle and do crazy designs. Limitless possibilities with it. Ever since I saw that script I have been fascinated with vehicle manipulation. Which is probably what I am best at now. I've been working on a framework that allows you to easily do more things with your vehicles, such as window animations, changing headlight distance, moving and real reflecting mirrors, adding on new vehicle parts or upgrades, modifying wheels to be bigger, wider, and many other things. Here are a few photos.
  2. ShayF

    math.random

    local last function getRandom(first, second) if second > first then local rand = math.random(first, second) if rand == last then return getRandom(first, second) end last = rand return rand end return false end This will get a random number between first and second, making sure its not the same as the last random number you got as well as making sure that its a valid math operation. I hope this helps.
  3. ShayF

    IDLE sound engine car

    RX7_sound = { {'001.wav',494}, } function replacesound(vehicle) local veh = source or vehicle for i,OBJ inipairs(RX7_sound) do if veh then if OBJ[2] == getElementModel(veh) then local x,y,z = getElementPosition(veh) sound = playSound3D(OBJ[1],x,y,z,true) attachElements(sound,veh) --sound = playSound(OBJ[1]) -- change to playSound3D() setSoundVolume(sound,0.5) setSoundMaxDistance(sound,25) end end end end addEventHandler('onVehicleEnter',resourceRoot,replacesound)
  4. ShayF

    Get vehicle size

    function getVehicleSize(vehicle) if vehicle and isElement(vehicle) and getElementType(vehicle) == 'vehicle' then local minX,minY,minZ,maxX,maxY,maxZ = getElementBoundingBox(vehicle) return maxX-minX,maxY-minY,maxZ-minZ end end This returns the length, width, and height of the vehicle. Since it is 3d, you have 3 things to worry about.
  5. ShayF

    [HELP] Doesnt delete all rows from table

    You're not structuring the table correctly.
  6. ShayF

    [HELP] Doesnt delete all rows from table

    unless you're going to use keys then I don't see why you're using a key loop. local vehicles = {} addCommandHandler('deveh',function(player) for i=1,#vehicles do local plr,veh = unpack(vehicles[i]) if (plr == player) then destroyElement(veh) table.remove(vehicles,i) end end end)
  7. ShayF

    offedit break command

    N0rt0x, Offroader23 made the offedit script and John Edited it, you may want to talk to them both about this.
  8. ShayF

    Set certain skin when player spawn

    Luke Leone
  9. ShayF

    [HELP] vehicle-system

    Where did you get this script?
  10. ShayF

    Advice with tables in lua

    yeah thanks bud, json ftw.
  11. ShayF

    Call functions in other directories?

    Script 1 <meta> <script src="script1.lua" type="server"/> <export function="output"/> </meta> function output() outputChatBox('Exports Confirmed') end Script 2 <meta> <include resource="script1"/> <script src="script2.lua" type="server"/> </meta> local e = exports.script1 e:output() Note that both have to be on the same side, server or client. Exported functions MUST be exported inside the meta of the same script where the function is located.
  12. ShayF

    Camber

    Well, if the x rotation was still, it wouldn't be a problem. So I'm guessing the math needs to be based off of the x rotation. I simply don't know what equation I need.
  13. ShayF

    Camber

    If you look at how the front wheel is in the picture, that's how I want it, except when the wheel rotates on the x axis to spin, it messes everything up, like it did with the rear wheel. I do use objects for the wheels. I'm able to resize them that way. I update it on every frame, the rotation of the wheel is set in render event.
  14. ShayF

    Camber

    That is my screenshot yes, but I can't just set y rotation it doesn't work, all the wheels wobble all over the place. I wanna know how to keep the camber and not have a wobbling wheel. What math do I need?
  15. ShayF

    Advice with tables in lua

    For all of you people out there needing to save data, just put it in a lua table and save it with JSON, that is if you want it saved on the server or on the client machine, it's the easiest way to do it. Do NOT use xml, xml is the worst saving method I have ever seen. It's complicated af, it uses tags just like html but other than that it's not even remotely close to html. XML - Hard to learn Hard to use Requires a LOT of functions Uses 75-90% of the file to simply create nodes and or categories Requires more than 3 XML functions to save or load data MTA has functions for xml but without them it is not compatible. JSON or SQLite for permanent local storage. MYSQL for permanent external storage. Element Data for temporary storage stored on element. Account Data for permanent storage stored in the servers internal.db registered to a specific account.