Author Topic: interesting /getvehicle command  (Read 828 times)

So I was messing around on the slopes in v16 and, I was getting a little annoyed at how in order to get back up to the top after skiing down the mountain, I had to either teleport, or fly back up.  Both seemed kind of cheaty so I made a little command that lets you teleport a vehicle to your position.

In order to use the command, name a vehicle spawn "yournameV".  Then spawn a vehicle from it and type /getvehicle.  The vehicle will be instantly teleported to your location.  This command is not admin only but can easily be modified to be admin only.

Code: (expanded) [Select]
function servercmdgetvehicle(%client)
{
%name = "_"@%client.name@"V";
if(isObject(%name.vehicle))
{
%name.vehicle.setTransform(%client.player.position);
}
else
{
messageclient(%client,"","<color:FFFFFF>No vehicle to get");
}
}

Code: (collapsed) [Select]
function servercmdgetvehicle(%client){%name = "_"@%client.name@"V";if(isObject(%name.vehicle)){%name.vehicle.setTransform(%client.player.position);}else{messageclient(%client,"","<color:FFFFFF>No vehicle to get");}}
If you don't want to package this up into an add-on you can easily just paste the collapsed code into your server console.


Anyhow I hope you find this useful.  Have a good day. ^.^


you do know that if you press f7 you immediately teleport to where you either last spawned or last f7'd out of orbing

you do know that if you press f7 you immediately teleport to where you either last spawned or last f7'd out of orbing
yeah

i think he's upset because he didn't want to cheat, not because he couldnt get up fast