Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

headscript

[V|REL|HOOK] LUA Plugin for Script Hook V

Recommended Posts

Wolv

Great work man!

I just got into the modding scene (though I have python and java knowledge ) so this is a really nifty start for me.

Share this post


Link to post
Share on other sites
Archibaldy

Great plugin! Larperdoodle actually stayed up all night writing his own mods, and I'm doing the same now, so thanks for making it so accessible! One thing I would like to request, however: would you be willing to change the default reload key to something like F7? F4 is Native Trainer, and it's getting a tad annoying to reset my mods when trying to spawn in vehicles, and I feel like others might eventually voice the same complaint.

 

Archibaldy

Share this post


Link to post
Share on other sites
diamond-optic

would you be willing to change the default reload key to something like F7? F4 is Native Trainer, and it's getting a tad annoying to reset my mods when trying to spawn in vehicles, and I feel like others might eventually voicethe same complaint.

 

 

 

i believe you can just change the main.lua

function tick()    --print("test")    if(get_key_pressed(115)) then        loadLibs()        loadAddIns()    end        for index, mod in pairs(addIns) do        if (mod.tick ~= nil) then                mod.tick()        end    end    end

change get_key_pressed(115) to get_key_pressed(118) for F7

Edited by diamond-optic

Share this post


Link to post
Share on other sites
burnsyboo

.

Edited by burnsyboo

Share this post


Link to post
Share on other sites
Player360

I'm sorry but ah, where can i find the GTA V script commands ?

 

I would like to create an LUA script for GTA V that makes the car heavy =/

 

I remember there was one code for GTA SA that makes the car heavy but I don't remember which code was so...

 

Can you help me =?

 

Edit: I've managed to open the script for GTA SA, it was like this make_car and very_heavy 1

 

There are something like that ?

Edited by Player360

Share this post


Link to post
Share on other sites
Reck1501
local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

Share this post


Link to post
Share on other sites
Fatiz
local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

 

local playerPed = PLAYER.PLAYER_PED_ID()local veh = VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);	local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);local model = GAMEPLAY.GET_HASH_KEY("COACH");
if(get_key_pressed(119)) then  if (STREAMING.IS_MODEL_IN_CDIMAGE(model) and STREAMING.IS_MODEL_A_VEHICLE(model)) then	STREAMING.REQUEST_MODEL(model);		while STREAMING.HAS_MODEL_LOADED(model) do				VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);				VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh);				print("Spawned!")				ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(playerPed));				STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model);				ENTITY.SET_VEHICLE_AS_NO_LONGER_NEEDED(veh);				end			end		end

I've been trying for a while and this is the closest I got the first click of F8 Spawns a crap load and lags then the second click of F8 crashes your game. I know its probably something easy to fix but any help would be appreciated.

Edited by Fatiz

Share this post


Link to post
Share on other sites
Reck1501

 

local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

 

local playerPed = PLAYER.PLAYER_PED_ID()local veh = VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);	local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);local model = GAMEPLAY.GET_HASH_KEY("COACH");
if(get_key_pressed(119)) then  if (STREAMING.IS_MODEL_IN_CDIMAGE(model) and STREAMING.IS_MODEL_A_VEHICLE(model)) then	STREAMING.REQUEST_MODEL(model);		while STREAMING.HAS_MODEL_LOADED(model) do				VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);				VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh);				print("Spawned!")				ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(playerPed));				STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model);				ENTITY.SET_VEHICLE_AS_NO_LONGER_NEEDED(veh);				end			end		end

I've been trying for a while and this is the closest I got the first click of F8 Spawns a crap load and lags then the second click of F8 crashes your game. I know probably something easy to fix but any help would be appreciated.

 

 

That's why I'm not risking using a loop. I'm trying to do it without one

 

..I mixed your script and mine together, and I did manage to do it without a loop, but then 6 busses dropped on me, lol

 

I got it! It's because of the .tick, but we can't just remove it

Edited by Reck1501

Share this post


Link to post
Share on other sites
DakotaCSS

Is there a chance you could change the way tick, init and unload are called in main.lua?

It's a very simple change and wont break older code.


From this:

for index, mod in pairs(addIns) do	if (mod.tick ~= nil) then		mod.tick()	endend

To this:

for index, mod in pairs(addIns) do	if (mod.tick ~= nil) then		mod:tick()	endend

We would be able to use "self" inside the modules functions.

Example:

function MODULE:init()	self.GUI = Libs["GUI"];	self.canClick = true;endInstead of..function MODULE:init()	MODULE.GUI = Libs["GUI"];	MODULE.canClick = true;end
Edited by DakotaCSS

Share this post


Link to post
Share on other sites
Fatiz

 

 

local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

 

local playerPed = PLAYER.PLAYER_PED_ID()local veh = VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);	local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);local model = GAMEPLAY.GET_HASH_KEY("COACH");
if(get_key_pressed(119)) then  if (STREAMING.IS_MODEL_IN_CDIMAGE(model) and STREAMING.IS_MODEL_A_VEHICLE(model)) then	STREAMING.REQUEST_MODEL(model);		while STREAMING.HAS_MODEL_LOADED(model) do				VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);				VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh);				print("Spawned!")				ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(playerPed));				STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model);				ENTITY.SET_VEHICLE_AS_NO_LONGER_NEEDED(veh);				end			end		end

I've been trying for a while and this is the closest I got the first click of F8 Spawns a crap load and lags then the second click of F8 crashes your game. I know probably something easy to fix but any help would be appreciated.

 

 

That's why I'm not risking using a loop. I'm trying to do it without one

 

..I mixed your script and mine together, and I did manage to do it without a loop, but then 6 busses dropped on me, lol

 

I got it! It's because of the .tick, but we can't just remove it

 

Mind posting the the script that you made without the loop

Share this post


Link to post
Share on other sites
Reck1501

Mind posting the the script that you made without the loop

local vehicle = {}function vehicle.tick()	if(get_key_pressed(96)) then		local carID = GAMEPLAY.GET_HASH_KEY("COACH")		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		local veh = VEHICLE.CREATE_VEHICLE(carID, playerPosition.x, playerPosition.y, playerPosition.z, 0.0, true, true)		VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh)			endendreturn vehicle

If you tap 0 on your numpad quickly, it will only spawn one bus.

 

I seem to have broken the code somehow.. It won't work for me anymore

Edited by Reck1501

Share this post


Link to post
Share on other sites
Swarm96

 

local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

 

local playerPed = PLAYER.PLAYER_PED_ID()local veh = VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);	local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);local model = GAMEPLAY.GET_HASH_KEY("COACH");
if(get_key_pressed(119)) then  if (STREAMING.IS_MODEL_IN_CDIMAGE(model) and STREAMING.IS_MODEL_A_VEHICLE(model)) then	STREAMING.REQUEST_MODEL(model);		while STREAMING.HAS_MODEL_LOADED(model) do				VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);				VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh);				print("Spawned!")				ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(playerPed));				STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model);				ENTITY.SET_VEHICLE_AS_NO_LONGER_NEEDED(veh);				end			end		end

I've been trying for a while and this is the closest I got the first click of F8 Spawns a crap load and lags then the second click of F8 crashes your game. I know its probably something easy to fix but any help would be appreciated.

 

Here ya go!

local Bringittome = {}function Bringittome.tick()	local playerPed = PLAYER.PLAYER_PED_ID()	local player = PLAYER.GET_PLAYER_PED(playerPed)	local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)	if(PLAYER.IS_PLAYER_ONLINE() and playerExists) then		if(get_key_pressed(118)) then			local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);			local CARskinID = GAMEPLAY.GET_HASH_KEY("COQUETTE")			STREAMING.REQUEST_MODEL(CARskinID)			local car = VEHICLE.CREATE_VEHICLE(CARskinID, coords.x, coords.y, coords.z, 0, true, true) 			end																									endendreturn Bringittome

Share this post


Link to post
Share on other sites
Reck1501

 

 

local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

 

local playerPed = PLAYER.PLAYER_PED_ID()local veh = VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);	local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);local model = GAMEPLAY.GET_HASH_KEY("COACH");
if(get_key_pressed(119)) then  if (STREAMING.IS_MODEL_IN_CDIMAGE(model) and STREAMING.IS_MODEL_A_VEHICLE(model)) then	STREAMING.REQUEST_MODEL(model);		while STREAMING.HAS_MODEL_LOADED(model) do				VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);				VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh);				print("Spawned!")				ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(playerPed));				STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model);				ENTITY.SET_VEHICLE_AS_NO_LONGER_NEEDED(veh);				end			end		end

I've been trying for a while and this is the closest I got the first click of F8 Spawns a crap load and lags then the second click of F8 crashes your game. I know its probably something easy to fix but any help would be appreciated.

 

Here ya go!

local Bringittome = {}function Bringittome.tick()	local playerPed = PLAYER.PLAYER_PED_ID()	local player = PLAYER.GET_PLAYER_PED(playerPed)	local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)	if(PLAYER.IS_PLAYER_ONLINE() and playerExists) then		if(get_key_pressed(118)) then			local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);			local CARskinID = GAMEPLAY.GET_HASH_KEY("COQUETTE")			STREAMING.REQUEST_MODEL(CARskinID)			local car = VEHICLE.CREATE_VEHICLE(CARskinID, coords.x, coords.y, coords.z, 0, true, true) 			end																									endendreturn Bringittome

 

It still spams the cars unless you tap the button extremely quick :p

Share this post


Link to post
Share on other sites
Swarm96

 

 

 

local vehicle = {}function vehicle.tick()	if(get_key_pressed(107)) then		local playerPed = PLAYER.PLAYER_PED_ID()		local playerPosition = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)		VEHICLE.CREATE_VEHICLE(0xB779A091, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)	endendreturn vehicle

Any idea why this isn't working? I'm trying to make it spawn an adder, but nothing happends when I execute it, and no errors in the console

 

local playerPed = PLAYER.PLAYER_PED_ID()local veh = VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);	local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);local model = GAMEPLAY.GET_HASH_KEY("COACH");
if(get_key_pressed(119)) then  if (STREAMING.IS_MODEL_IN_CDIMAGE(model) and STREAMING.IS_MODEL_A_VEHICLE(model)) then	STREAMING.REQUEST_MODEL(model);		while STREAMING.HAS_MODEL_LOADED(model) do				VEHICLE.CREATE_VEHICLE(model, coords.x, coords.y, coords.z, 0.0, false, true);				VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(veh);				print("Spawned!")				ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(playerPed));				STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model);				ENTITY.SET_VEHICLE_AS_NO_LONGER_NEEDED(veh);				end			end		end

I've been trying for a while and this is the closest I got the first click of F8 Spawns a crap load and lags then the second click of F8 crashes your game. I know its probably something easy to fix but any help would be appreciated.

 

Here ya go!

local Bringittome = {}function Bringittome.tick()	local playerPed = PLAYER.PLAYER_PED_ID()	local player = PLAYER.GET_PLAYER_PED(playerPed)	local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)	if(PLAYER.IS_PLAYER_ONLINE() and playerExists) then		if(get_key_pressed(118)) then			local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0);			local CARskinID = GAMEPLAY.GET_HASH_KEY("COQUETTE")			STREAMING.REQUEST_MODEL(CARskinID)			local car = VEHICLE.CREATE_VEHICLE(CARskinID, coords.x, coords.y, coords.z, 0, true, true) 			end																									endendreturn Bringittome

 

It still spams the cars unless you tap the button extremely quick :p

 

Just add a delay(200) to the beginning.

Share this post


Link to post
Share on other sites
Swarm96

Has anyone figured out GET_CLOSEST_VEHICLE? Doesn't seem to work reliably for me, and only seems to detect empty ones.

Share this post


Link to post
Share on other sites
First30
ASI: Loading "Z:\Steam\steamapps\common\Grand Theft Auto V\LUA.asi"

"LUA.asi" failed to load


Anyone else have this problem?

Share this post


Link to post
Share on other sites
47goon

I keep getting this error randomly, it seems to only happen when I try to add custom files

 

"tick: scripts/main.lua:285: attempt to index local 'mod' (a boolean value)"

 

The only way i found to fix it was re-installing the plugin, anyone know a fix?

Edited by 47goon

Share this post


Link to post
Share on other sites
Swarm96
if(get_key_pressed(118)) then			local CarSkinID = GAMEPLAY.GET_HASH_KEY("TURISMOR")			local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerPed, 0.0, 5.0, 0.0)			STREAMING.REQUEST_MODEL(CarSkinID)			local veh = VEHICLE.GET_CLOSEST_VEHICLE(coords.x, coords.y, coords.z, 1000, CarSkinID, 0)			print(veh)			end

Can anyone shed some light on why this might not be working? Even if I stand beside a TurismoR veh returns 0.

Share this post


Link to post
Share on other sites
Aardvark2015
local veh = VEHICLE.GET_CLOSEST_VEHICLE(coords.x, coords.y, coords.z, 1000, CarSkinID, 0)

Can anyone shed some light on why this might not be working? Even if I stand beside a TurismoR veh returns 0.

 

 

IIRC I read here that the last argument is a bitflag which probably controls what kinds of vehicles are found.

You could try passing -1, which should have all bits set and maybe find everything...

 

Some values I see in decompiled scripts are: 0, 4, 6, (64 | 65536 | 2048 | 1 | 2 | 4 | 32 | 16 | 8)

Which bit does what is anyone's guess.

Share this post


Link to post
Share on other sites
Swarm96

 

local veh = VEHICLE.GET_CLOSEST_VEHICLE(coords.x, coords.y, coords.z, 1000, CarSkinID, 0)

Can anyone shed some light on why this might not be working? Even if I stand beside a TurismoR veh returns 0.

 

 

IIRC I read here that the last argument is a bitflag which probably controls what kinds of vehicles are found.

You could try passing -1, which should have all bits set and maybe find everything...

 

Some values I see in decompiled scripts are: 0, 4, 6, (64 | 65536 | 2048 | 1 | 2 | 4 | 32 | 16 | 8)

Which bit does what is anyone's guess.

 

Yeah I tried with all those & got no results whatsoever. I did copy another script and change it to local veh = VEHICLE.GET_CLOSEST_VEHICLE(coords.x, coords.y, coords.z, 1000, 0, 64) and it seem to be getting values. It changed only when I got close to empty cars, and would not change if I moved away from an empty one towards a car with a PED in it until I kicked them out and got back out. Changing the bit on the end didn't seem to change much except it broke when I set it to -1. It also doesnt seem to detect player owned cars, as I was just testing this in a private server with my TurismoR.

Edited by Swarm96

Share this post


Link to post
Share on other sites
bugbutts

Gonna try to fiddle around and learn some lua now because of this. Any favorite editors? Notepad++ or??

 

Thanks for any tips.

Share this post


Link to post
Share on other sites
bugbutts

When I start the game with this I get immediate wanted level of 4.

 

Loaded main.luaIncrease Wanted to 4
Increase Wanted to 4
Increase Wanted to 4
(lots more of these)

 

Any ideas?

 

Oops. Didn't have the main.lua file in there. Might help.

Edited by bugbutts

Share this post


Link to post
Share on other sites
Chumillas

Gonna try to fiddle around and learn some lua now because of this. Any favorite editors? Notepad++ or??

 

Thanks for any tips.

Notepad++ and SublimeText are very good ones, you don't need more. Both support plugins and autocompletion.

Share this post


Link to post
Share on other sites
Snuki

Can anyone help me with why this isn't working?

local water = {}function water.unload()endfunction water.init()endfunction water.tick()	if(get_key_pressed(96)) then		MODIFY_WATER(0,0,0,0)	endendreturn water

I get this error: 335f235579.png

Share this post


Link to post
Share on other sites
Aardvark2015

I get this error: 335f235579.png

 

The functions here are in the same "namespace" as in natives.h, so:

WATER.MODIFY_WATER(0,0,0,0)

Share this post


Link to post
Share on other sites
Misterdiablo94

can you tell me what is the code for the spawn of pedestrians ?

 

thanks ^_^

Share this post


Link to post
Share on other sites
Snuki

 

I get this error: 335f235579.png

 

The functions here are in the same "namespace" as in natives.h, so:

WATER.MODIFY_WATER(0,0,0,0)

Thanks, now I don't get the error. But it doesn't seem to do anything? No matter I set the values to, the water just stays the same.

Am I missing something about how I would edit this?

Edited by Snuki

Share this post


Link to post
Share on other sites
Misterdiablo94

Ok, thanks you reck

Share this post


Link to post
Share on other sites
GriffinC

The script doesn't work for me for some reason, it says that it failed to run in the log. I had the same issue with the vehicle controller script but that was solved somehow.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 3 Users Currently Viewing
    0 members, 0 Anonymous, 3 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.