Guest Posted April 25, 2008 Share Posted April 25, 2008 hi, im new to MTA.. and im dont know how to make simple teleports xDDD in sa-mp its very easy, in mta : dm, i dont know how. i need : /sf position : -2025.8760,147.1338,29.2072 and goes message to chatbox " Reamis now in San Fierro" //----- And how to add custom vehicles, just like this : Link to comment
Borov Posted April 25, 2008 Share Posted April 25, 2008 in mtadm, teleporting is called "warp", search the function list and you'll see. Link to comment
Guest Posted April 25, 2008 Share Posted April 25, 2008 function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) setElementPosition ( source, 1509.9346,-1673.0631,14.0469 ) end addCommandHandler ( "ls", consoleSetPlayerPosition ) is it good? Link to comment
Borov Posted April 25, 2008 Share Posted April 25, 2008 why do you have posx posy posz in a command function and you aren't using it? Link to comment
Guest Posted April 25, 2008 Share Posted April 25, 2008 becouse im beginner... can u make teleport script to teleport with vehicle? Link to comment
Brophy Posted April 25, 2008 Share Posted April 25, 2008 yes, but change source in setElementPosition with the vehicle the player is using -- Very basic vehicle positioner function consoleSetVehiclePosition ( source, commandName, posX, posY, posZ ) setElementPosition ( getPlayerOccupiedVehicle(source), posX, posY, posZ ) end addCommandHandler ( "ls", consoleSetVehiclePosition ) it will throw errors if you try to do it on someone not in a vehicle unless you put a check in it, its easy enough so ill let you do it, check the development wiki for help and if you are feeling more adventurous combine it into the player position function by giving it vehicle detection Link to comment
50p Posted April 26, 2008 Share Posted April 26, 2008 People, read the question. He wants a command /sf which teleports you to San Fierro and displays a message. addCommandHandler( "sf", function( player ) setElementPosition( player, -2025.8760, 147.1338, 29.2072 ) outputChatBox( "Reamis now in San Fierro", player ) end ) 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