[Tool/Web/Other] [DATA] all vehicle dimensions and vehicle dummies
#1

The list is huge so it is posted on pastebin:

http://pastebin.com/rKDAhRkv

It contains, for each and every car:
- Car's exact size / dimensions
- For each car dummy - the dummy's location

Useful for say.. you want to detect precise wheel location on a car for better tire spikes
OR you need to know vehicle dimensions to dynamically arrange a lot of different cars into optimal size..
In the future if we have access to vehicle orientation on ALL axis you could even reliably detect if a player is shooting at a car's petrolcap and script the explosion even on slopes or when car is upside down.

Some parts are mirrored by the game - most notably the driver and passenger seat dummies (ped_frontseat, ped_backseat) and light dummies.

If you go to absurd levels, this is useful for Roleplay servers - with this dataset you could detect where in game world the car part is (say a broken light, door, wheel), and have mechanics repair the exact piece in front of them.

This dataset is infinitely useful for a lot of purposes, i suggest you limit it to the data that you actually need (say just car dimensions, or wheels, and discard the rest (there is a really huge amout of data in that that you usually won't need))
Reply
#2

Whow, this will be really useful. Thanks for sharing.
Reply
#3

This is just a DATAset, you are supposed to script stuff that uses it on your own.
Reply
#4

Alright.
Reply
#5

There is a problem with this data - some dummy coordinates seem wrong, i am looking into it.

EDIT: list is now corrected: http://pastebin.com/rKDAhRkv
Reply
#6

please re-upload the data. Pastebin seem to have problems
Reply
#7

Very, very useful!
I'll create an include for this :P
Reply
#8

thanks man, very useful!....
Reply
#9

Whoa! That's a whole load of work! (If you haven't used your own tools to make them :P)

That's really useful.
Reply
#10

Great, we can make car blinking systems with this and AttachPlayerObjectToVehicle (I'm still waiting for that), but why there's only 2 coordinates for 4 lights? What is "ug_lights"?
Reply
#11

rear lights are one object i think, would explain why the ems mod cant flash the rear lights

Also, does anyone want this in an array format?
Reply
#12

Quote:
Originally Posted by leong124
Посмотреть сообщение
Great, we can make car blinking systems with this and AttachPlayerObjectToVehicle (I'm still waiting for that), but why there's only 2 coordinates for 4 lights? What is "ug_lights"?
Probably won't be added because it would be more complex to make it happen, but the objects limit was increases in 0.3D to 1000 objects which is more than enough to script in a lot of vehicle-attached objects, you can also "stream" the createobject objects.
Reply
#13

This is very useful, great work.
Reply
#14

Wow now we can create something that can kill a passenger according to its seat when a player shoots a vehicle!
Prety damn amazing

Oftopic: are u able to get the chords of a gta sa singleplayer building? Since u added removebuild in ur edigor
If yes u should make something like this cuz it can be usefulltoo for rp's!
Reply
#15

Epically useful, thanks!
Reply
#16

Very Useful for me thanks.
Reply
#17

Wow the information about the vehicle is awesome but my math knowledge isn't as good to make something with this values.

I can't use GetVehiclePos and subtract this values. It would only work if the Angle of the vehicle would be 0° ... Hmm It is really hard.
Reply
#18

Thanks great sharing.
Reply
#19

After 30 Minites thinking I have now the solution to get the real position of the Petrolcap from the vehicle:
I lookat at the function:
pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (GetPlayerVehicleID(playerid))
    {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
if I now take the angle of the player and add 180° i get:
pawn Код:
stock GetXYInBehindOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (GetPlayerVehicleID(playerid))
    {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    a+=180;
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
The only thing i have to do now is to add to the angle "a+=180" an other angle, which i get if I calculate the Angle with the tangent of OffSetY div OffSetX... Furthermore I change playerid to vehicleid because a player hasn't a Petrolcap :P
-----------------------------------------------------------------------------------
The finish Function looks like this:
pawn Код:
stock GetXYZOfOffSetPositions(vehicleid,Float:OffSetX,Float:OffSetY,Float:OffSetZ,&Float:x, &Float:y, &Float:z)
{
    new Float:a,Float:distance;
    GetVehiclePos(vehicleid, x, y, z);
    GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    a-=180.0+atan(OffSetY,OffSetX);
    distance = floatsqroot(floatpower(OffSetX,2)+floatpower(OffSetY,2))
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
    z += OffSetZ;
}
Now it's really easy to use... Here is an Example
Код:
400 petrolcap -1.10 -2.06 -0.07
pawn Код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
{
    if(GetVehicleModel(vehicleid) == 400)
    {
        new Float:LookingPos[3];
        GetXYZOfOffSetPositions(vehicleid,-1.10,-2.06,-0.07,LookingPos[0], LookingPos[1], LookingPos[2]);
        // Now you only have to check if the player looks at the Position LookingPos[0], LookingPos[1], LookingPos[2]
        // If the player do this, you know that he aims at the petrolcap ...
    }
    return 1;
}
Reply
#20

@Nanory:

https://sampforum.blast.hk/showthread.php?tid=272440
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)