Skip to content

Commit

Permalink
Final commit for 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Freeeaky committed May 9, 2015
1 parent 1b8d3ab commit a811c39
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
7 changes: 4 additions & 3 deletions build/GTALua/addons/_empty_addon/main.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
--
-- Remember:
-- Your addon will only be loaded if you have an ASI file for it!
-- Take the empty_addon.asi, rename it, and copy it to your main GTA directory!
-- Check out "Getting started" on the Wiki!
-- http://freeschi.com/w/index.php/Main_Page
-- http://freeschi.com/w/index.php/Getting_Started
-- http://freeschi.com/w/index.php/API
--

-- Please rename empty_addon!
Expand Down
2 changes: 0 additions & 2 deletions build/GTALua/addons/_example_01_spawn_vehicle/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ example_vehicle = ScriptThread("example_01_spawn_vehicle")
-- Run function
-- This is called once! It's your job to keep this alive!
function example_vehicle:Run()
print("hi")

-- while-loop, do not use while true !
while self:IsRunning() do
-- Key-Down-Check
Expand Down
11 changes: 2 additions & 9 deletions build/GTALua/addons/_example_03_simple_menu/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@
-- http://freeschi.com/w/index.php/Getting_Started
-- http://freeschi.com/w/index.php/API
--

include("../../internal/extensions/CNativeReg.lua")
include("../../internal/game/gui.lua")

-- I recommend matching addon name & script thread name
example_simple_menu = ScriptThread("example_simple_menu")

-- Callback
function example_simple_menu:MenuCallback_Test(menu, text)
print("Option toggled: ", text)
print("Given message: ", text)
menu:Close()
end

-- Run
function example_simple_menu:Run()
print("hlo ?")

-- Setup Menu
local menu = gui.SimpleMenu(self, {
Title = "Menu 123", -- title of the menu
Expand Down Expand Up @@ -51,6 +45,5 @@ function example_simple_menu:Run()
end
end

print("hi")

-- Register
example_simple_menu:Register()
5 changes: 5 additions & 0 deletions build/GTALua/internal/extensions/Vector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ function Vector.__sub(a, b)
return Vector(a.x - b.x, a.y - b.y, a.z - b.z)
end

-- Vector == Vector
function Vector.__eq(a, b)
return a.x == b.x and a.y == b.y and a.z == b.z
end

-- Unpack
function Vector:Unpack()
return self.x, self.y, self.z
Expand Down
2 changes: 0 additions & 2 deletions build/GTALua/internal/game/Entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ class 'Entity'(Object)

-- CTor
function Entity:__init(id)
--Object.__init(self, id)

self._type = "Entity"
self.ID = id
end
Expand Down

0 comments on commit a811c39

Please sign in to comment.