Liberty Unleashed

Scripting => Script Help => Topic started by: bl0x0ld on June 28, 2011, 04:47:50 am

Title: Finding out Location
Post by: bl0x0ld on June 28, 2011, 04:47:50 am
Hi Im new to the GTA self serving, I found most things simple enough for me within the wiki, maybe i didnt spend enough time on it but I just wanted to know..

How to find out a position to (spawn cars, weps, ect) and how would i determine the direction the entitity is facing ect,

and if there is an ingame editor or a live view editor may i be forwarded to it please, thank you


O, and are there no helicopters? didnt find any on the id list. alot of vehicles are missing on the list
Title: Re: Finding out Location
Post by: Thijn on June 28, 2011, 07:39:57 am
You can get your position with player.Pos
and your angle (a.k.a. derection the entity if facing ) with player.Angle

And no, of course there are no helicopters. There aren't any in the normal GTA3.
Same for cars, they are all added..
Title: Re: Finding out Location
Post by: bl0x0ld on June 28, 2011, 07:01:32 pm
Sorry, I went ingame and tried all forms of this command and nothing worked.. may you be more specific, is there something else i should do beside just typing in the command???
Title: Re: Finding out Location
Post by: Thijn on June 29, 2011, 10:34:01 am
You need to make a script for it, it isn't a default command.

Make a new script and put this in it:

Code: [Select]
function onPlayerCommand( pPlayer, cmd, text )
{
if ( cmd == "pos" )
{
MessagePlayer( "Your current position: " + pPlayer.Pos, pPlayer);
MessagePlayer( "Your Angle: " + pPlayer.Angle, pPlayer );
}
}
Title: Re: Finding out Location
Post by: Force on June 29, 2011, 02:28:19 pm
http://forum.liberty-unleashed.co.uk/index.php?topic=391.0 (http://forum.liberty-unleashed.co.uk/index.php?topic=391.0)

That may help you out if your looking to create a content.xml with skins/vehicles. :)
Title: Re: Finding out Location
Post by: bl0x0ld on June 29, 2011, 06:43:01 pm
You need to make a script for it, it isn't a default command.

Make a new script and put this in it:

Code: [Select]
function onPlayerCommand( pPlayer, cmd, text )
{
if ( cmd == "pos" )
{
MessagePlayer( "Your current position: " + pPlayer.Pos, pPlayer);
MessagePlayer( "Your Angle: " + pPlayer.Angle, pPlayer );
}
}

PERFECT!!!