This tag is for questions about writing scripts (modding) in the programming environment provided by "Grand Theft Auto" (GTA) game series.
Questions tagged [grand-theft-auto]
36 questions
5
votes
4 answers
How can I make Lua scripts un-decompilable?
I have many Lua scripts (for the multiplayer mod Multi Theft Auto) that are compiled, for many reasons, including theft prevention. In reality, this is only a theft deterrent, as Luadec (http://luadec51.luaforge.net/) can easily de-compile the…
user1066652
4
votes
1 answer
How can I make my character enter a car on the backseat of a vehicle in GTA with a C#-Script?
I started to create a tiny Mod for GTA V, but I haven't found many Tutorials. The Mod is supposed to spawn a stretch-limo with a driver. When the limo is near me, I can enter the backseat with F-key and the driver will drive me to a waypoint.
At the…

JavaGamer
- 51
- 8
2
votes
0 answers
Lua function returns Nil
I have a problem with a function that returns a table. That table is filled with data from a DB row (on another function) and then the function send that to the client to be displayed. I initialized the table and filled with random data, which is…

pcolombo2
- 21
- 2
1
vote
0 answers
Trying to transform GTA V coordinates to CEF three.js coordinates
I'm using GTA V with modification which allows me to create multiplayer server. This modification displaying CEF in front of the game and gives me ability to show information for player using chromium.
My goal was to make an editor of objects that…

Jakub Skakuj
- 11
- 2
1
vote
1 answer
Lua oop static object value
How would I make self.character.data().bank the same to all instances of the class
even when using the function setBank? currently when using setBank it only updates self.character.data().bank on the one instance if it makes sense
_G.GetUser = {
…

Fnug
- 23
- 5
1
vote
0 answers
Lua error attempt to index nil value while checking if player has the correct amount of a item
This script allows people to produce meth, starting production will succeed when you have the right amount of objects in your inventory.
Only when you don't have the right amount you should get a notification and you don't get that…

Jelle
- 11
- 2
1
vote
2 answers
Problems with decoding JSON in lua
I have the following code:
PerformHttpRequest('http://ossie.dk/API/verify.json',function(err, text, headers)
local r=json.decode(text)
for s,t in pairs(r.servers)do
print(t)
end
end,"GET","",{})
My problem is,…

OssieFromDK
- 51
- 2
- 6
1
vote
1 answer
How to add more than one variable
function CountCops()
local xPlayers = ESX.GetPlayers()
CopsConnected = 0
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
…

Akira Saito
- 11
- 2
1
vote
3 answers
LUA ERROR attempt to perform arithmetic on boolean value
``` local xpNeed = 100; -- E.g. 100 * lvl = XP you need to rank up!
addEvent("onPlayerLevelUp", true);
function addPlayerXp(player, xp)
local acc = getPlayerAccount(player);
local oldexp = getAccountData(acc, "exp") or…

LuAmateur
- 11
- 3
1
vote
1 answer
How is mod menus made in lua when the game was written in c?
i saw a video of someone using mods on a game called GTA 5. i was interested in making a menu that looks as good as there's. i then realised there menu was made in Lua and in-fact most mod menus are made in Lua, but GTA 5 was written in c and other…
user12602944
1
vote
0 answers
what kind of encoding is this and how to decode it
I asked my friend and he said that it's AST. But I'm not sure and don't know how to decode it.
SCE = {} SCE[0x3B06D907] = function() return SCE[0x16D35994]({SCE[0x2CCB9B3C](), SCE[0x24AA4743](), SCE[0x1E716305](), SCE[0x2A7C5767](),…

Cường Quốc Hoàng
- 27
- 2
1
vote
1 answer
Error running call reference function for resource es_extended fiveM
Basically have another fivem es_extended issue where I am getting unwelcome errors everytime users try and join my server and show their money as undefined, and also not allow them to save their clothing.
I've dropped tables from my database and…

Dans
- 33
- 5
0
votes
0 answers
RageMP Server convert to FiveM?
I have a full RageMP Roleplay server and would like to port all the features and scripts to FiveM to make them work. Could someone help me or show me how to do this?
Maybe someone who could do it for me or could show me how i could do it

Artur
- 1
0
votes
0 answers
How to resolve problem with es_extended Fivem
i have a problem with es_extended.
I have this error : SCRIPT ERROR: @es_extended/client/functions.lua:554: bad argument #1 to 'vector3' (invalid vector type)
the link of the es_extended that I downloaded…
0
votes
0 answers
attempt to call a nil value (global 'TriggerClientEvent') FiveM Chatbox
So I bought this script and I cant seem to find any support on it...So Imma need some help here. For reference this script plays a "Typing" Gif above someones head when they type
RegisterCommand("chatbox", function(source, args, rawCommand)
…

cylence
- 15
- 8