GerardWay Posted May 11, 2013 Share Posted May 11, 2013 rancher = createVehicle ( 490, 101.17621, 1942.22717, 18.41861 ) addEventHandler ( "onVehicleStartEnter", rancher, function ( thePlayer ) if ( not isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Adam" ) ) ) then outputChatBox ( "You cannot use this vehicle as it belongs to Adam!", thePlayer, 255, 0, 0 ) cancelEvent ( ) end end ) sultan = createVehicle ( 560, -398.38452, 1290.49658, 9.23544 ) addEventHandler ( "onVehicleStartEnter", sultan, function ( thePlayer ) if ( not isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Martin" ) ) ) then outputChatBox ( "You cannot use this vehicle as it belongs to Martin!", thePlayer, 255, 0, 0 ) cancelEvent ( ) end end ) function martinVehicle() setElementPosition (source, -400.31415, 1294.04468, 9.95310) end addCommandHandler ( "mv", martinVehicle ) function adamVehicle() setElementPosition (source, 92.69779, 1945.70471, 18.06420) end addCommandHandler ("av", adamVehicle) Link to comment
DiSaMe Posted May 11, 2013 Share Posted May 11, 2013 Variable 'source' is not defined in functions 'martinVehicle' and 'adamVehicle'. Link to comment
GerardWay Posted May 11, 2013 Author Share Posted May 11, 2013 That isnt the problem, the vehicles dont even appear O_O But thanks anyway Link to comment
Castillo Posted May 11, 2013 Share Posted May 11, 2013 Are you sure that the positions are the correct ones? does the debugscript say anything related to this script? Link to comment
فاّرس Posted May 11, 2013 Share Posted May 11, 2013 function martinVehicle() setElementPosition (source, -400.31415, 1294.04468, 9.95310) end addCommandHandler ( "mv", martinVehicle ) should be : function martinVehicle(player) setElementPosition (player, -400.31415, 1294.04468, 9.95310) end addCommandHandler ( "mv", martinVehicle ) and function adamVehicle() setElementPosition (source, 92.69779, 1945.70471, 18.06420) end addCommandHandler ("av", adamVehicle) should be : function adamVehicle(player) setElementPosition (player, 92.69779, 1945.70471, 18.06420) end addCommandHandler ("av", adamVehicle) Link to comment
GerardWay Posted May 11, 2013 Author Share Posted May 11, 2013 Thanks, it works. People cant use the passenger seats of the vehicles now! D: Can you guys fix it please? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now