FiveM Scripting 6 - Creating a Speedometer Using Conditionals and Math (Lua)

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 63

  • @nickdedmor
    @nickdedmor 10 месяцев назад +2

    Top quality content right there mate. Maybe a follow up video on how to style the speedometer by adding the actual visual meter, belt icons etc?

  • @DjGeorge124
    @DjGeorge124 3 года назад +3

    i am watching you only 1 day and i ve learn a lot of things , really thank you jeva !!!

    • @lucaskellan1225
      @lucaskellan1225 3 года назад

      I guess im randomly asking but does someone know of a way to log back into an instagram account..?
      I was stupid forgot my login password. I would love any assistance you can give me.

    • @DjGeorge124
      @DjGeorge124 3 года назад

      @@lucaskellan1225 there is a magic thing that knows everything called Google

    • @natharon
      @natharon 3 года назад

      @@DjGeorge124 i became brain dead reading both of these replies

  • @ludvigdahlgren7592
    @ludvigdahlgren7592 5 лет назад +4

    You’re making really helpfuk videos pls Continue

    • @ludvigdahlgren7592
      @ludvigdahlgren7592 5 лет назад

      Maybe if you show how to add some essential mode and some stuff

  • @ericoverton2966
    @ericoverton2966 5 лет назад +7

    there is something wrong with the coding i followed step by step checked triple checked everything and wont let me access the server now

  • @yazeenm.7979
    @yazeenm.7979 5 лет назад +2

    7:30 Maybe dumb question but can you explain why you got the speed of the vehicle the player is in before checking IsPedInAnyVehicle?
    Also, How to set the time the DrawText is active on screen?

    • @SneakyAzWhat
      @SneakyAzWhat 5 лет назад +1

      Have to declare the variable before it can be used in the if statement.

    • @yazeenm.7979
      @yazeenm.7979 5 лет назад +1

      @@SneakyAzWhat That's what i don't understand. Why not create the variable inside the if statement or simply put it inside ceil/floor? Isn't it better to store the Entity speed in the variable 'speed' after checking if player is in any vehicle?

    • @SneakyAzWhat
      @SneakyAzWhat 5 лет назад +1

      @@yazeenm.7979 By putting it outside of the "if" statement we can use it elsewhere in the code also. If /speed/ is declared inside of the "if" statement then we can only use that /speed/ variable within the if statement.

    • @yazeenm.7979
      @yazeenm.7979 5 лет назад +1

      @@SneakyAzWhat I get what scope of a variable is but wouldn't it simply store null or false value in speed variable and its totally useless if player is not im any vehicle. What would the speed contain if getvehiclepedisin returns false (if player is on foot)

    • @hudspeth_tv
      @hudspeth_tv 5 лет назад

      It does save a call by declaring speed inside the if. great tutorial series though. keep going buddy!

  • @kiwiklasker4175
    @kiwiklasker4175 4 года назад +3

    You are so good to tutorial! keep up the good work!

  • @kladdkakan8537
    @kladdkakan8537 4 года назад +2

    If you'd want to register a command for this specific script, like /speedometer and the UI for the speedmeter turns off, is that possible? Appreciate any help

    • @binagrecaducao3845
      @binagrecaducao3845 2 года назад

      watch the previous episode bro, it shows how to start and end functions

  • @azyree7608
    @azyree7608 4 года назад +4

    it doesnt show up for me help

  • @stin_fapa_apo_Nullz
    @stin_fapa_apo_Nullz 2 месяца назад

    what extensions are you using

  • @iplaygames23
    @iplaygames23 3 года назад

    How could you add a simple Picture next to the speed?

  • @micspamgod2324
    @micspamgod2324 3 года назад

    Yeah but how would you make it toggle on and off using a key on the keyboard?

  • @donpanagiotic3521
    @donpanagiotic3521 3 года назад

    Hello!Can I add image or replace the textures?

  • @netix187
    @netix187 5 лет назад

    How did you got the map i dont have the map at the bottom left?

  • @OfficialTEG
    @OfficialTEG 3 года назад

    So does this work still or has the syntax changed?

  • @CoastCFN
    @CoastCFN 4 года назад

    Can you tell me how to have labels in text in chat
    like staff team

  • @DrKriisz
    @DrKriisz 4 года назад

    Hey yo! Thanks for that it was really helpful! But why doesn't show up the zero, when the car stopped?

  • @manaftermayhem8287
    @manaftermayhem8287 Год назад

    is there a chance you can fix a script for me it's an esx script ?

  • @spyback229
    @spyback229 5 лет назад

    Hi, would there be anyway to get text besides the speed?

    • @vitocorleoneg
      @vitocorleoneg 2 года назад

      AddTextComponentString("MPH " .. content)

  • @xShdw
    @xShdw 4 года назад

    would you be able to do anything like this with Singleplayer for having a Speedometer but the way some of the "RP" servers have theirs setup? I like certain HUD and you seem to know what you're doing for this question. Great vid btw (:

  • @toxiccocuk1267
    @toxiccocuk1267 Год назад

    Does anybody know how i can learn to write these scripts i don't want to get them from somebody else i want to write them by myself
    i searched at google, some forum's and youtube but i couldn't find anything what i found is just: *Download that here is the code copy paste copy paste do this and here is your mod*
    And some are like oh type this and this done
    I want somebody that would explain the code like i don't know anything about those (obviusly i know coding but this is my first time writing a code like this)

  • @DrewTheBot
    @DrewTheBot 6 лет назад

    Damn zua youre almost at 100 subs already?!?!?

  • @itslariz3468
    @itslariz3468 4 года назад

    does it works on notepad?

  • @patrunjelu9862
    @patrunjelu9862 4 года назад +1

    5:41 wtf? how?

  • @davidprendergast6425
    @davidprendergast6425 4 года назад

    Your a legend mate Cheers. 👌👍😎

  • @fabianczaplicki5117
    @fabianczaplicki5117 5 лет назад

    How can I change the color?

  • @aliunutan1157
    @aliunutan1157 4 года назад

    could no open resource meta data file

  • @louisfs8987
    @louisfs8987 4 года назад

    how to i add a block comment??

  • @hoiblij6737
    @hoiblij6737 4 года назад

    I'd check if the player is in a vehicle before calculating the speed. Just for performance's sake.

  • @TnDFam
    @TnDFam Год назад

    WHATS THE PROGRAM THAT IS AOLLOWING YOU TO DO THIS ALL?????? mind saying that next time

    • @cdog25z
      @cdog25z Год назад +1

      Visual Studio Code. A simple google search would have given you that answer.

  • @jyolandos
    @jyolandos 5 лет назад +2

    You make good work!

  • @idkhowtodoanything9320
    @idkhowtodoanything9320 3 года назад

    can i just hire you i feel like thatd be eiser

  • @caveygaming
    @caveygaming Год назад +1

    Turn the music down!!

  • @lodomirmis1505
    @lodomirmis1505 5 лет назад

    Yes

  • @sven-_-_-1934
    @sven-_-_-1934 5 лет назад

    What is kmh?

  • @jamalelbarakeh5023
    @jamalelbarakeh5023 4 года назад

    how do I get the perms ingame

  • @arti179
    @arti179 4 года назад

    Хочу передать привет Илье Еськову который по советовал начать обучение с этого видео ,так вот я нихера не понял.

  • @woz99
    @woz99 6 лет назад +1

    😃

    • @99kr2
      @99kr2 6 лет назад

      Hejsan

    • @99kr2
      @99kr2 6 лет назад

      @@7emporary70 ey nu juckar han

  • @samirsaffar7109
    @samirsaffar7109 5 месяцев назад

    Please put subtitles in Brazilian Portuguese ;-;

  • @nirlevy26
    @nirlevy26 4 года назад

    dede

  • @mustocrp1020
    @mustocrp1020 4 года назад

    ur playlist broken.

  • @Armas6u9
    @Armas6u9 5 лет назад

    i love you

  • @jorge4304
    @jorge4304 5 лет назад

    all i want is someone to make me a fivem server for rp i will pay you

  • @harrylind02
    @harrylind02 4 месяца назад +1

    How do you make comments and stuff like that in vsc?