TanguyOrtegat / jb_vehiclelock

vehiclelock client sided
1 stars 2 forks source link

Locking cars #3

Open AtomicKRG opened 5 years ago

AtomicKRG commented 5 years ago

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 commented 5 years ago

I need that too..!!

TanguyOrtegat commented 5 years ago

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 commented 5 years ago

Ok thank you. -------- Ursprüngliche Nachricht --------Von: TanguyOrtegat notifications@github.com Datum: 09.04.19 12:50 (GMT+01:00) An: TanguyOrtegat/jb_vehiclelock jb_vehiclelock@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: Re: [TanguyOrtegat/jb_vehiclelock] Locking cars (#3) 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

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/TanguyOrtegat/jb_vehiclelock","title":"TanguyOrtegat/jb_vehiclelock","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/TanguyOrtegat/jb_vehiclelock"}},"updates":{"snippets":[{"icon":"PERSON","message":"@TanguyOrtegat in #3: i can check that for you when i got some time :)\r\nHere at the moment it's a client side script, so everyone can lock the vehicle"}],"action":{"name":"View Issue","url":"https://github.com/TanguyOrtegat/jb_vehiclelock/issues/3#issuecomment-481201920"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/TanguyOrtegat/jb_vehiclelock/issues/3#issuecomment-481201920", "url": "https://github.com/TanguyOrtegat/jb_vehiclelock/issues/3#issuecomment-481201920", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

FRANkiller13 commented 5 years ago

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

TanguyOrtegat commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

AtomicKRG commented 5 years ago

Same error like Frank.

FRANkiller13 commented 5 years ago

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

AtomicKRG commented 5 years ago

Thank you very much.

FRANkiller13 commented 5 years ago

Tell me if this works on you

AtomicKRG commented 5 years ago

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

FRANkiller13 commented 5 years ago

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

Castano20 commented 5 years ago

I already have this script. null