KaMeR Posted January 12, 2008 Share Posted January 12, 2008 why when vehicle is created cant destroy him and is locked??? function scriptCreateVoo ( commandName ) local localPlayer = getLocalPlayer ( ) local x, y, z = getElementPosition ( localPlayer ) createVehicle ( 412, x + 5, y, z + 1 ) end addCommandHandler ( "voo", scriptCreateVoo ) Link to comment
[email protected] Posted January 12, 2008 Share Posted January 12, 2008 why when vehicle is created cant destroy him and is locked??? function scriptCreateVoo ( commandName ) local localPlayer = getLocalPlayer ( ) local x, y, z = getElementPosition ( localPlayer ) createVehicle ( 412, x + 5, y, z + 1 ) end addCommandHandler ( "voo", scriptCreateVoo ) As far as I can see you did not post the code you have to destroy a vehicle... what are you trying to destroy it? Link to comment
Guest Posted January 12, 2008 Share Posted January 12, 2008 He trying to spawn vehicle, but when vehicle is spawned, he can't get in or destroy vehicle, i think. Looks like vehicle is closed. Link to comment
[email protected] Posted January 12, 2008 Share Posted January 12, 2008 Assuming this is a client-side script (server-side scripts do not support getLocalPlayer() ), then the script contains no errors. Seeing that the vehicle really did spawn, but cannot be used/destroyed... I think the problem might lie on the server's end. Perhaps the vehicle is only created client-side? (not sure how createVehicle() behaves in a client-side script, I always use it server-side) That would explain why the server can't interact with it.. Another thing can be that another script destroys the vehicle directly when it spawned (but not visually removing it) Either way, if this is a client-side script I see no errors in it. 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