Freeeaky / GTALua

Scripting engine for GTA V in Lua
GNU General Public License v2.0
60 stars 25 forks source link

Player:GetAimedEntity() cannot return object #78

Closed seifer7 closed 9 years ago

seifer7 commented 9 years ago

Due to a small typo in this function, an object can't be returned.

Player.lua file

96: if ent:IsPed() then
97:     return Ped(ent_id)
98: elseif ent:IsVehicle() then
99:     return Vehicle(ent_id)
100: elseif ent:IsObject() then
101:     return Object(ent)
102: end

Line 101 should be return Object(ent_id)

Freeeaky commented 9 years ago

This is already fixed in the new Version, thanks for the report tho ;) Am 01.08.2015 15:59 schrieb "loveletslive7" notifications@github.com:

Due to a small typo in this function, an object can't be returned.

Player.lua file

96: if ent:IsPed() then 97: return Ped(ent_id) 98: elseif ent:IsVehicle() then 99: return Vehicle(ent_id) 100: elseif ent:IsObject() then 101: return Object(ent) 102: end

Line 101 should be return Object(ent_id)

— Reply to this email directly or view it on GitHub https://github.com/Freeeaky/GTALua/issues/78.

seifer7 commented 9 years ago

Np. I'll post if I come across anything else. I already noticed a bunch of things were fixed but I was using an old version rolls eyes