Author Topic: Finding out Location  (Read 3237 times)

bl0x0ld

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Finding out Location
« on: June 28, 2011, 05: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
« Last Edit: June 29, 2011, 01:05:29 am by bl0x0ld »

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Finding out Location
« Reply #1 on: June 28, 2011, 08: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..

bl0x0ld

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Finding out Location
« Reply #2 on: June 28, 2011, 08: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???
« Last Edit: June 29, 2011, 01:05:02 am by bl0x0ld »

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Finding out Location
« Reply #3 on: June 29, 2011, 11: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 );
}
}

Force

  • Developer
  • Full Member
  • *****
  • Posts: 204
  • Karma: +6/-2
    • View Profile
Re: Finding out Location
« Reply #4 on: June 29, 2011, 03:28:19 pm »
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. :)
Quote
[Tue - 20:09:35] <&VRocker> CRAP!
[Tue - 20:09:43] <&VRocker> i think i just followed through...
Quote
[Sat - 22:11:56] <~Smapy> [R3V]breSt12 killed [R3V]Jack_Bauer. (Splat)

bl0x0ld

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Finding out Location
« Reply #5 on: June 29, 2011, 07: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!!!

 

© Liberty Unleashed Team.