FiveM Lua Scripting Commands and Natives (Zero to Hero Episode 3)

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

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

  •  9 дней назад

    I just want to tell you, that you make a nice, clear and easy go teaching explanation... You help me as no one else before to understand the scence and more than basic concepts... I appreciate a lots your time and dedication to teach some others. Even english it´s not my first language, you speak so clearly that I understand you all you sayed. Great teaching... thanks a lots bud!!!

  • @oleksii9381
    @oleksii9381 5 дней назад

    Absolutly love your videos!

  • @realotfjay866
    @realotfjay866 2 года назад +3

    Great Series. Hands down the best way to learn how to script in fiveM with lua you my friend have earned a sub!

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

    best teacher ever

  • @alytamer1353
    @alytamer1353 2 года назад +2

    Honestly i like the way you teach stuff keep going and make more videos

  • @LlopEstepari
    @LlopEstepari 9 месяцев назад +3

    WEAPON SPAWNER SCRIPT:
    RegisterCommand('weapon', function(source, args)
    local wName = args[1] -- Weapon name
    local wAmmo = args[2] or 999 -- Weapon ammo
    --Check if the weapon name is valid
    if not IsWeaponValid(wName) then
    TriggerEvent('chat:addMessage', {
    args = { 'Oh, ' .. wName .. ' is not a weapon'}
    })
    return
    end
    local playerPed = PlayerPedId()
    local pos = GetEntityCoords(playerPed)
    GiveWeaponToPed(playerPed, wName, wAmmo, false, true)
    end)

    • @Camacho1207
      @Camacho1207 7 месяцев назад +2

      Very good, but I don't think you need to get the player pos

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

    Great video, took a couple tries but I finally got it. I have no prior coding experience but im hoping this series will help me make a trap house script.

  • @goofy1982
    @goofy1982 Год назад +3

    can u make a tutorial about making a weapon spawner

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

    Very very thanks you, I'am from poland and I notunderstand good english, but your tutorial is very understand thanks you

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

    I'm a beginner, and these videos are excellent! Your discord invite is now invalid though.

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

    Is it possible to have a new discord link because the one in the video is no longer valid?
    anyway really good, I'm a beginner and I'm slowly learning how the world of fivem and scripting works

  • @s0n433
    @s0n433 2 года назад +2

    Hi, honestly your videos are great and please keep going. But i have question about variable args[1]? I know agrs can be used in printing message but what args[1] exactly doing? Thanks.

    • @RebelFinatic
      @RebelFinatic 2 года назад +1

      Basically take this for example /car italirsx red. In the command I mentioned args[1] is italirsx and args[2] is red which is the color of the car in my hypothetical situation.

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

      Well, your comment is old, but I will answer this in case someone has the same doubt.
      Basically, args is the argument of your command, like this: /car cheetah. In this case, cheetah is the argument, so the variable will basically receive cheetah.
      Arguments are stored in tables. So, if you type the command like this: /car cheetah something, cheetah will be the first element of the table, and something will be the second. If the variable is set to receive args[1], then the variable is receiving the first element of the table, which is cheetah.

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

    Hello sir i cant type in terminal when i from there maybe cuz i using txadmin?

  • @vtmercy_1839
    @vtmercy_1839 2 года назад +1

    hey man I have a question I want to create a script which spawns my stretcher that stretcher counts as a vehicle how could I make it spawn only that vehicle?

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

    great series look your content recently started on a fiveM server and wanted to learn how to make it only thing I see is that your discord invite doesn't work

    • @Junk-Junky
      @Junk-Junky 11 месяцев назад

      Same, did you found the discord?

    • @KipataSensei
      @KipataSensei 11 месяцев назад

      nope@@Junk-Junky

  • @kidrax2533
    @kidrax2533 Год назад +2

    Can anyone explains to me more in depth what is the need behind the "RequestModel" native ?

    • @payton.a.elliott
      @payton.a.elliott Год назад +2

      It loads the model into memory, allowing it to be pulled into the game.

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

    i dont know what happen with me but that dosen't work well, i dont receive the message if is not a vehicle i try and try everything not a single thing work
    RegisterCommand('car', function(source, args)
    local vehicleName = args[1] or 'adder'
    if not IsModelInCdimage(vehicleName) or not IsModelAVehicle(vehicleName) then
    TriggerEvent('chat:addMessage',{
    args = { 'uh ho,'.. vehicleName.. ' is not a vehicle.'}
    })
    return
    end
    TriggerEvent('chat:addMessage',{
    args = {'nice, ' .. vehicleName .. ' is a vehicle.', }
    })
    end)

  • @rojintim5646
    @rojintim5646 10 месяцев назад

    I keep getting can't find resources ..... when I refresh, it sees it, but when I start it, it says, can't find resources. Any ideas, guys?

  • @donfeymezo
    @donfeymezo 10 месяцев назад

    Can i get a new discord link to your server. This one in description is expired ;(

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

    This was a great way to learn I run a redm server and I feel like I could make a script if love to see you make one for rsgcore for redm there's not many people out there to help

  • @arnelis.
    @arnelis. Год назад

    How to get the console with the FXserver becuze i cant start or refresh the resoursce or something what to do?

  • @Axelek-sd8dg
    @Axelek-sd8dg Год назад

    How fix " Awaiting Scripts" ???

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

    Does anyone have any idea on how to use the native ForceSnowPass? trying to find things related but its a little different.

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

    Can i write this code in Js?

  • @ali_5456
    @ali_5456 2 года назад +1

    How do u have fivem console(terminal) on vs code?

    • @maney9303
      @maney9303 2 года назад +1

      open the server starter and then in the terminal do "cd (starter location)"

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

      Watch episode 1

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

    I am curious. The same code could be used for creating a cheat for spawning a car into a public third party server? You can't, right? These changes are made in server side so it means you need to gain server access for injecting it into the game in this scenario. Am I wrong?
    Creating a series for developing a cheat and how to inject it into the game could be interesting. Obviously I am talking as developer.
    Thanks for your time Charles.

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

      i would love to know how this works to, but i think eulen for example, injects into the files that are the player is downloading when trying to connect to the server. that's a vulnerable point and eulen injects the files needed to run the scripts and even eulen itself once in-game. and injected sucessfully. i think, it's either that or it's client sided and just sends false info to the server side and tricks the server side.

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

    idk wtf im doing wrong, followed everything did have spelling errors but fixed them and fixed some brackets, but the script doesn't work? anyone know what the file hardcap is for

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

      same here

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

      @@spamaspamas8081 i had some words misspelled, only thing is idk if spaces mean anything, in the code format.

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

    local vehicleNama = args[1] or 'adder'
    what does the 'adder' command does?

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

      if you type "/gun" the chat , server will give you an adder car

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

      If you type /car without specifying an argument that is the car you want to create, a vehicle named 'adder' will be created.

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

    Sir Charles, is your discord server still active? if yes can you update the invite link i'm a beginner programmer and i wanna start learning with lua since im also playing GTA V

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

      Did you get the invite link?

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

      @@sommy_ no luck

  • @alvinsden
    @alvinsden 6 месяцев назад

    Hi Charles, Your Discord invite is invalid. Can you please share your valid discord invite?

  • @ulle9985
    @ulle9985 3 месяца назад

    I need a new discord link

  • @Xoloes
    @Xoloes 7 месяцев назад

    what extension your using for the colors to appear without it putting errors all over my code, if anyone know pls tell me i can't without colors i accidently put yes instead of true cause of this

    • @snohflakeR6
      @snohflakeR6 6 месяцев назад

      changing the theme of vscode fixed it for me

  • @giwrgosgeorgiou4806
    @giwrgosgeorgiou4806 11 месяцев назад

    Hello love the vids so far... do you still have a discord server? can we please have a new link if discord is still available?

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

    Great content but the volume is so so low...

  • @chrisharris2153
    @chrisharris2153 10 месяцев назад

    You are amazing! I want to create a emote menu that displays the emotes with previews. I want the user to be able to select the emote they want to use while also being able to place their character a within a given range.
    RegisterCommand('weapon', function(source, args)
    local weaponName = args[1] or 'weapon_combatpistol'
    if not IsWeaponValid(weaponName) then
    print(('Sorry, that is not a valid weapon.: %s'):format(weaponName))
    return
    end
    local playerPed = PlayerPedId()
    local weaponHash = weaponName
    GiveWeaponToPed(playerPed, weaponName, 200, false, true)
    end)

  • @Nick-c5k
    @Nick-c5k Месяц назад

    RegisterCommand('weapon', function(source, args)
    local weaponName = args[1]
    if not IsWeaponValid(weaponName) then
    TriggerEvent('chat:addMessage', {
    args = {'Oh no '.. weaponName ..' is not a weapon'}
    })
    return
    end
    TriggerEvent('chat:addMessage',{
    args = {'Nice '.. weaponName.. ' is a weapon'}
    })
    local playerPed = PlayerPedId()
    local pos = GetEntityCoords(playerPed)
    GiveWeaponToPed(
    playerPed,
    weaponName,
    10,
    false,
    true
    )
    end)