Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locking cars #3

Open
AtomicKRG opened this issue Mar 28, 2019 · 14 comments
Open

Locking cars #3

AtomicKRG opened this issue Mar 28, 2019 · 14 comments

Comments

@AtomicKRG
Copy link

First good work. But everybody can lock every car ? Can you please help me that only the owner of the car can lock the car ? Thank you for your help.

@FRANkiller13
Copy link

I need that too..!!

@TanguyOrtegat
Copy link
Owner

i can check that for you when i got some time :)
Here at the moment it's a client side script, so everyone can lock the vehicle

@Castano20
Copy link

Castano20 commented Apr 9, 2019 via email

@FRANkiller13
Copy link

Thanks for your work.. im gonna test the script i will tell you results <3

@TanguyOrtegat
Copy link
Owner

TanguyOrtegat commented Apr 9, 2019

esx_jb_vehiclelock.zip

here updated version, because forgot something :)
ps: it closes car when outside, but when you enter vehicle wont open it, so need to fix that... so it is a temporary script

@FRANkiller13
Copy link

FRANkiller13 commented Apr 9, 2019

cfx> Error running call reference function for resource esx_jb_vehiclelock: citi zen:/scripting/lua/scheduler.lua:403: @esx_jb_vehiclelock/jb_vehiclelockserver.l ua:10: attempt to index a nil value (global 'MySQL') stack traceback: @esx_jb_vehiclelock/jb_vehiclelockserver.lua:10: in upvalue 'ref' citizen:/scripting/lua/scheduler.lua:389: in function <citizen:/scriptin g/lua/scheduler.lua:388> [C]: in function 'xpcall' citizen:/scripting/lua/scheduler.lua:388: in function <citizen:/scriptin g/lua/scheduler.lua:387> stack traceback: [C]: in function 'error' citizen:/scripting/lua/scheduler.lua:403: in function <citizen:/scriptin g/lua/scheduler.lua:372> Error running system event handling function for resource es_extended: citizen:/ scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua /MessagePack.lua:830: missing bytes stack traceback: [C]: in function 'error' citizen:/scripting/lua/MessagePack.lua:830: in method 'underflow' citizen:/scripting/lua/MessagePack.lua:465: in field 'any' citizen:/scripting/lua/MessagePack.lua:860: in field 'unpack' citizen:/scripting/lua/scheduler.lua:626: in field '?' @es_extended/server/functions.lua:33: in field 'TriggerServerCallback' @es_extended/server/common.lua:63: in upvalue 'handler' citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scriptin g/lua/scheduler.lua:218> stack traceback: [C]: in function 'error' citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow' citizen:/scripting/lua/scheduler.lua:218: in function <citizen:/scriptin g/lua/scheduler.lua:182>

on this line probably
MySQL.Async.fetchAll("SELECT * FROM owned_vehicles WHERE owner=@Identifier and plate = @plate",{['@Identifier'] = identifier, ['@plate'] = plate}, function(data)

I fix it by adding on __resource.lua

server_script '@mysql-async/lib/MySQL.lua'

and now it says "Ce véhicule ne t'appartient pas"

@AtomicKRG
Copy link
Author

First thank you for your work but how can I fix the problem ?

@AtomicKRG
Copy link
Author

Same error like Frank.

@FRANkiller13
Copy link

FRANkiller13 commented Apr 9, 2019

I fix the problem.. now it works
esx_jb_vehiclelock.zip
@AtomicKRG

@AtomicKRG
Copy link
Author

Thank you very much.

@FRANkiller13
Copy link

Tell me if this works on you

@AtomicKRG
Copy link
Author

It work but I can lock every car. Also cars that Im not owned.

@FRANkiller13
Copy link

FRANkiller13 commented Apr 9, 2019

add this and try again @AtomicKRG https://github.com/TanguyOrtegat/esx_jb_eden_garage or esx_drp_garage

@Castano20
Copy link

Castano20 commented Apr 9, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants