Jump to content

[HELP] Function bug my script


InDev

Recommended Posts

Hi all,

I have a problem in my script i just made this function but when i restart the resource it bug my script, all the functions after this one bugs and i don't know what's wrong in the function so i hope you'll see clearer than me :)

Thanks for the help.

Here is the function:

function parkVeh( thePlayer, commandName )
local veh = getPedOccupiedVehicle( thePlayer )
if( veh )then
local owner = getElementInfo( veh, "Owner" ) --"getElementInfo" -> personnal function, don't bug
local plname = getPlayerName( thePlayer )
if( owner == plname )then
local x, y, z = getElementPosition( thePlayer )
local a, b, c = getVehicleRotation( veh )
		setElementInfo( veh, "X", x ) --"setElementInfo" -> personnal function, don't bug
		setElementInfo( veh, "Y", y )
		setElementInfo( veh, "Z", z )
		setElementInfo( veh, "A", c )
outputChatBox( "You have parked your vehicle, it will respawn here now", thePlayer, 0, 255, 0 )
end
end
end
addCommandHanler( "park", parkVeh )

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...