Jump to content

Recommended Posts

CALL FUNCTION DOESN'T WORK

I tried to use "handbrake" command from Vehicle System resource (link: https://github.com/FlyingSpoon/vehicle-system).

Of course, I've called to function, that I had to create either, because there were only command handlers, but the error kept showing up in console: failed to call 'vsys:handbrakeA'.

IMPORTANT: I've added mark to meta file of Vehicle System that I want to export a function, even, I set one .Lua file to <shared>.

(Server-side) function:

function garage(player)
	local veh = getPedOccupiedVehicle(player)
	local x, y, z = getElementPosition(player)
	if veh then
		setElementPosition(veh, 4651.0595703125, -15999.06640625, -0.55000001192093)
		call(getResourceFromName("vsys"), "handbrakeA", player)
		call(getResourceFromName("vsys"), "parkA", player)
		removePedFromVehicle(player)
		setElementPosition(player, x, y, z)
		outputChatBox ("#09ff00Gotowe!", player, 255, 255, 255, true)
	else
		outputChatBox("#ff1100Musisz być w pojeździe!",player, 255, 255, 255, true)
	end
end

*Do not teleport urself to the coordinates! ?

*outputChatBox messages translations: 1st - Done!, 2nd - You need to be in vehicle!

CAN SOMEONE HELP, PLEASE? ?

Edited by VaporZ
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...