[Release] [EN/FR] [Async] Docks V2 - 07/06/17 Updated

http://plysken.com/gta5/docks.jpg

Name: Docks

Version: 2 - 07/06/17

Download: http://plysken.com/gta5/index.php/Ply_docks

9 Likes

good job man thanks a try this good baguette

Not even gonna credit me for finding 12294? or for the idea? XD

Sorry, i have been awake for 20 hours, and i did not make any “pause”, i just forgot.
Of course the credit goes to you for finding the “12294” values, but the idea… i give you 50% cause it was on my to do list ^^
Top topic edited.

2 Likes

Fr: vous codez pour un serveur ou juste pour le fun ?
En : Are you coding for you or for a server ?

Hi,

For the moment just for fun.

Maybe in a futur for a server…

And can the future may is now ? https://discord.gg/kjkKKrj

I liked bcs I’m part of French Baguette power ! xD

I got this error:

To fix it, at the top of client.lua (line 12), change boats = {} to BOATS = {}

Yep, it’s all right.

I also got this error:

But I dont know how to fix it because there’s already RegisterServerEvent('ply_docks:CheckMoneyForBoat') in boatshop_s.lua line 4 :confused:

hey mate,
I am gettings this error when a player conect to the server:
https://gyazo.com/89f67af15125d5c9b629c1eb21007793
I was searching into server.lua :

AddEventHandler('playerConnecting', function()
	local player_state = 1
	local executed_query = MySQL:executeQuery("SELECT * FROM users WHERE player_state = '@player_state'",
      {['@player_state'] = player_state})
	local result = MySQL:getResults(executed_query, {'player_state'})
	if (result) then
		for i,v in ipairs(result) do
			sum = sum + v.player_state
		end
	else
		sum = 0
	end
	if (sum < 1) then
		local old_state = "Sortit"
		local state = "Rentré"
		local executed_query = MySQL:executeQuery("UPDATE user_boat SET `boat_state`='@state' WHERE boat_state = '@old_state'",
		{['@old_state'] = old_state, ['@state'] = state})
	end
end)

I guess you miss in you sql.slq the player_state field .

Anyway, thanks for this script.

Yes, my bad.

Solution is :

look a the top topic :slight_smile:

1 Like

Im unable to find essentials 2 and es_freeroam 2 :S
Is anyone able to put a link up?

@Kanersps doesn’t want people to use the outdated and broken version of EssentialMode. Use the updated version.

1 Like

or we can just start writing our scripts using async calls. When you see a DataReader error it’s probably a good indication that you’re overlapping your calls and need to make the overlapping calls a-synchronous.

Update of 07/06/17

  • Add English translation. by default the script is in FR (cause champagne)
  • Rework of the server.lua to integrate Mysql Async Librarby
  • Fix some bug that where you setout multiple boats, the code did not check the good one to setin the dock.
  • Same thing with the “sell your boat function”
1 Like

Which freemode do i get? there are multiple by that name… :frowning:

i have essentials 5 and the sql async and i did sql and getting error still its saying server.lua error and client.lua and when i go to place to purchase i see boats but when i click to buy nothing happens

Did you port the script using the fx porting notes? As is the script is for cfx and doesn’t work on fx. Update the script or contact the developer.