SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/02/2015, 07:13 AM   #1
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,099
Reputation: 112
Default Getting vehicle driver seat (or even driver door) position?

If I wanted to get the coords of a vehicle seat, would it be the same as:

pawn Code:
new Float:x, Float:y, Float:z;
GetVehicleModelInfo(vInfo[i][vModel], VEHICLE_MODEL_INFO_FRONTSEAT, x, y, z);
distance = GetPlayerDistanceFromPoint(playerid, vInfo[i][vLastX] + x, vInfo[i][vLastY] + y, vInfo[i][vLastZ] + z);

Because right now, I'm still getting LastX, LastY, and LastZ as my coords returned.

Is there a way to get the driver seat position of a model?

ANOTHER question: I remember seeing somewhere something that could remove vehicle icons on the minimap. I dont remember where, however. How is this possible?
Aerotactics is offline   Reply With Quote
Old 15/02/2015, 08:09 PM   #2
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,099
Reputation: 112
Default Re: Getting vehicle driver seat (or even driver door) position?

Bump
Aerotactics is offline   Reply With Quote
Old 24/02/2015, 11:44 AM   #3
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,099
Reputation: 112
Default Re: Getting vehicle driver seat (or even driver door) position?

Bump
Aerotactics is offline   Reply With Quote
Old 24/02/2015, 11:50 AM   #4
Golf
Gangsta
 
Join Date: Jun 2014
Location: DZ
Posts: 523
Reputation: 47
Default Re: Getting vehicle driver seat (or even driver door) position?

1- http://wiki.sa-mp.com/wiki/GetVehicleZAngle
2- It's not possible. No server hides them. Some servers just don't have vehicles
__________________
Golf is offline   Reply With Quote
Old 24/02/2015, 11:58 AM   #5
Smileys
Huge Clucker
 
Smileys's Avatar
 
Join Date: Dec 2013
Location: Home.
Posts: 394
Reputation: 31
Default Re: Getting vehicle driver seat (or even driver door) position?

http://wiki.sa-mp.com/wiki/Vehicle_information_types

VEHICLE_MODEL_INFO_FRONTSEAT // Position of the front seat*
[*]: These values are calculated from the center of the vehicle.

Which means that it'll give very low values, seen as it returns the values of the center of the vehicle to the front seat, instead of the front seat on the world map.

I'm not sure what you're trying to achieve, why do you want to get the position of the front seat anyway?
Smileys is offline   Reply With Quote
Old 24/02/2015, 01:32 PM   #6
Aerotactics
High-roller
 
Aerotactics's Avatar
 
Join Date: Jun 2013
Location: return 0;
Posts: 1,099
Reputation: 112
Default Re: Getting vehicle driver seat (or even driver door) position?

Quote:
Originally Posted by Smileys View Post
http://wiki.sa-mp.com/wiki/Vehicle_information_types

VEHICLE_MODEL_INFO_FRONTSEAT // Position of the front seat*
[*]: These values are calculated from the center of the vehicle.

Which means that it'll give very low values, seen as it returns the values of the center of the vehicle to the front seat, instead of the front seat on the world map.

I'm not sure what you're trying to achieve, why do you want to get the position of the front seat anyway?
It may sound strange, but I'm checking to see if a player is in range of the door, so that when they use door cmds (such as /vlock, for example) a client message will read "<player> sticks the key into the door lock and twists to unlock the door."

The issue is that my current design (simply getting a vehicles position) is too far from the door on some vehicles.
Aerotactics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
See if a player is near to the driver's door or the passenger door Hantex. Scripting Help 9 04/09/2014 12:06 AM
How can I make it so the driver's seat is locked for a player? jueix Scripting Help 2 06/08/2013 03:51 PM
Lock driver's door only Blowfish Help Archive 11 09/08/2011 04:01 PM
Shooting in the driver seat (could be useful) reckon Help Archive 5 08/08/2009 08:05 PM
When player enters driver seat? Salmon Help Archive 2 15/02/2009 03:29 PM


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.