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!!!
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)
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.
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
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.
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.
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.
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?
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
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)
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
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.
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.
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
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
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
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)
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)
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!!!
Absolutly love your videos!
Great Series. Hands down the best way to learn how to script in fiveM with lua you my friend have earned a sub!
best teacher ever
Honestly i like the way you teach stuff keep going and make more videos
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)
Very good, but I don't think you need to get the player pos
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.
its so fun to learn
can u make a tutorial about making a weapon spawner
Very very thanks you, I'am from poland and I notunderstand good english, but your tutorial is very understand thanks you
I'm a beginner, and these videos are excellent! Your discord invite is now invalid though.
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
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.
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.
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.
Hello sir i cant type in terminal when i from there maybe cuz i using txadmin?
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?
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
Same, did you found the discord?
nope@@Junk-Junky
Can anyone explains to me more in depth what is the need behind the "RequestModel" native ?
It loads the model into memory, allowing it to be pulled into the game.
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)
did u find any solution?
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?
Can i get a new discord link to your server. This one in description is expired ;(
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
How to get the console with the FXserver becuze i cant start or refresh the resoursce or something what to do?
How fix " Awaiting Scripts" ???
Does anyone have any idea on how to use the native ForceSnowPass? trying to find things related but its a little different.
Can i write this code in Js?
How do u have fivem console(terminal) on vs code?
open the server starter and then in the terminal do "cd (starter location)"
Watch episode 1
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.
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.
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
same here
@@spamaspamas8081 i had some words misspelled, only thing is idk if spaces mean anything, in the code format.
local vehicleNama = args[1] or 'adder'
what does the 'adder' command does?
if you type "/gun" the chat , server will give you an adder car
If you type /car without specifying an argument that is the car you want to create, a vehicle named 'adder' will be created.
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
Did you get the invite link?
@@sommy_ no luck
Hi Charles, Your Discord invite is invalid. Can you please share your valid discord invite?
I need a new discord link
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
changing the theme of vscode fixed it for me
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?
Great content but the volume is so so low...
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)
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)