SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Includes (https://forum.sa-mp.com/forumdisplay.php?f=83)
-   -   [Include] All GTA SA Object Array (https://forum.sa-mp.com/showthread.php?t=415397)

Pottus 13/02/2013 12:08 AM

All GTA SA Object Array
 
A few days ago I was thinking if it would be possible to create an in game RemoveBuildingForPlayer() for my map editor. I knew I would need a list of all the objects in GTA SA and their positions to make it happen so I went ahead extracting all the object data from all the .IPL's processed them into an array.

ENUM

Code:

enum SearchInfo {
Search_Model,
Search_LODModel,
Search_Model_Name[64],
Float:SearchX,
Float:SearchY,
Float:SearchZ,
Float:SearchRX,
Float:SearchRY,
Float:SearchRZ
}

Test position when using test array since it takes a few minutes to compile with the full array list this will help out.

Code:

CMD:testpos(playerid, arg[])
{
        SetPlayerPos(playerid, 3.6618,-2594.0713,39.7159);
        return 1;
}


There are no LOD objects in the list the object positions have their LODModel counterpart listed so using RemoveBuildingForPlayer() for both model and LODmodel should remove the building.

Known issues:
There are a few objects that might not actually have a LODModel associated but is listed anyways although not very many and really should be so much an issue as these objects are often small components of a house for example that has the same position as house object.

The rotation values may not be 100 percent precise for all objects.

File:

https://www.mediafire.com/?2c8ywc3h1veza4p

Pottus 13/02/2013 12:12 AM

Re: All GTA SA Object Array
 
I put this in the wrong section by accident please move to includes thanks.

Jay_ 13/02/2013 12:27 AM

Re: All GTA SA Object Array
 
Moved.

Good job - I can think of quite a few uses for this for in game map editing.

MP2 13/02/2013 12:40 AM

Re: All GTA SA Object Array
 
Omg, I totally needed this! Thank you!

CaptainMactavish 13/02/2013 01:51 AM

Respuesta: All GTA SA Object Array
 
Very useful, arigatou gozaimasu.

MP2 21/02/2013 12:23 AM

Re: All GTA SA Object Array
 
This takes soooooooooooooo long to compile D: (like 3 minutes!).

Pottus 21/02/2013 12:57 AM

Re: All GTA SA Object Array
 
Quote:

Originally Posted by MP2 (Post 2393483)
This takes soooooooooooooo long to compile D: (like 3 minutes!).


That is why is there is a test array there, I wish there was a way to compile it quicker I guess it's just the one real con with the array.

Edvin 21/02/2013 01:20 PM

Re: All GTA SA Object Array
 
Very useful job!

MP2 21/02/2013 01:36 PM

Re: All GTA SA Object Array
 
Quote:

Originally Posted by [uL]Pottus (Post 2393510)
That is why is there is a test array there, I wish there was a way to compile it quicker I guess it's just the one real con with the array.

Do ANY of the objects actually USE the rx/ry rotation? NONE of them seem to. I guess you could remove them?

EDIT: Hmm, a few (less than 1 percent) use x and y rotation :/

Perhaps it may be an idea to store them in files? Eh idk.

Vince 21/02/2013 01:41 PM

Re: All GTA SA Object Array
 
Hint: use const and stock modifiers.


All times are GMT. The time now is 06:21 PM.

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