Limits


Here you can find a list of all GTA: Underground (and UG-MP) limits. We've listed some client-side limits which are relevant for server developers as well. We didn't really change any server-side limit, but obviously we still list them regardless.

Client-side limits

All of the client-side limits can be found here.


Model ID limits

A list of model ID limits that primarily concern DL.

The way you make sure you don't exceed any of them is by not adding more than what UG (and SA) themselves already use plus anything your server might add. Given that the limits are very high, you should not wory too much about exceeding them.

A future expansion to DL might introduce streamed IDEs to let model IDs be allocated only when they are needed and freed when they are no longer used. This is of course assuming we will still be able to.

Name Description
Model IDs The total number of models that can be used by the game. Every in-game model has an unique ID to identify it with.
TXD IDs The total number of TXDs that can be used by the game. Like models, TXDs have their own IDs as well. They receive one dynamically when adding new models (be it via IDE files or natives)
COL IDs The total number of collision archives that can be added to the game. When the game reads the header of an IMG file, it will dynamically assign an ID to any collision archives present within the cdimage.

Name GTA: SA limit GTA: UG limit
Model IDs 20000 60000
TXD IDs 5000 65500
COL IDs 256 60000

Entity limits

The table below lists all entity limits. Keep in mind that players will crash once any of these limits are exceeded. Fortunately, in GTA: Underground these limits are high enough so this shouldn't happen very often.

Name Description
Buildings A limit to how many buildings can be spawned at any moment. The game considers any placed map object, albeit roads, buildings, but not lampposts and other props, as a building. Very few natives actually change the number of buildings spawned, one of them being RemoveBuildingForPlayer.
Peds The maximum number of spawned peds. The number of spawned peds differs from player to player. The game counts anything from players to actors as a "ped".
Vehicles How many vehicles can be spawned at any one time. The number of spawned vehicles differs from player to player. (1)
Objects How many objects can be spawned at any one time. Anything inside object.dat is considered as an object (which means pretty much all props). Keep in mind that all objects are converted to dummies until you get close to them. There is a dummy limit too! Natives that change the number of spawend objects and/or dummies include (but are not limited to) CreateObject and CreatePlayerObject.
Dummies How many "non-spawned" objects can be present at any one time. Since GTA: SA and GTA: UG use streamed IPLs, the number of used dummies should be pretty low, and you shouldn't worry too much about exceeding it.

Name GTA: SA limit SA-MP limit GTA: UG limit UG-MP limit
Buildings 13000 20000 35000 35000
Peds 140 210 500 500
Vehicles 110 710 250 1024
Objects 350 3000 2000 5000
Dummies 2500 4000 15000 15000

Map limits

Several things are limited in terms of map coordinates. This includes anything from the map itself, to pickups, zones, and other stuff.

Name Description
Map size The size of the in-game map (map bounds). It is not possible to place anything outside of the map boundaries.
Pickup position The area in which you can create pickups. Do note that this is because the positions are compressed and some precision is lost (the XY values you pass to CreatePickup divided by 8). Exceeding the limit therefore results in integer overflow.

Name GTA: SA limit GTA: UG limit
Map size XY -3000.0 to 3000.0 XY -24000.0 to 24000.0
Pickup position XY -4096.0 to 4095.875 XY -134217728.0 to 134217727.875

Textdraws

SA-MP limits for textdraws on the client. This section has been taken over from the SA-MP documentation and has been revised. UG-MP does not increase any of them.

Name Description
Textdraws rendered The maximum of textdraws rendered simultaneously.
Textdraw sprites rendered The maximum number of textdraw sprites rendered.
Textdraw string length Self-explanatory (2)

Name Limit
Textdraws rendered The server-side Textdraws and Per-player textdraws limits combined.
Textdraw sprites rendered 100
Textdraw string length Same as its server-side counterpart.

Server-side limits

All of the server-side limits can be found here. This section has been taken over from the SA-MP documentation and has been revised. UG-MP does not increase any of the server-side SA-MP limits. UG-MP server-side limits can also be found here.


Script properties

Name Description
Players The maximum number of players that can connect to a single server.
Vehicles The number of vehicles that can be created using CreateVehicle. (4)
Objects The number of objects that can be created using CreateObject.
Virtual worlds The highest possible virtual world ID.
Area ID The highest possible area ID (or interior ID) which can be set using SetPlayerInterior.
Map icons The number of map icon ID / blip ID that can be created using SetPlayerMapIcon. (4)
Race checkpoints The number of race checkpoint that can be created using SetPlayerRaceCheckpoint. (4)
Checkpoints The number of checkpoints that can be created using SetPlayerCheckpoint. (4)
Pickups The number of pickups that can be created using CreatePickup. (4)
Global 3D labels The number of global 3D labels that can be created using Create3DTextLabel. (4)
Per-player 3D labels The number of per-player 3D labels that can be created using CreatePlayer3DTextLabel. (4)
Chat bubble string length The maximum length a chat bubble string may have.
Material text string length The maximum length a material text string may have.
Gang zones The number of gang zones that can be created using CreateGangZone.
Menus The number of menus that can be created using CreateMenu.
Attached player objects The number of objects that can be attached using SetPlayerAttachedObject.
Player variables The number of per-player variables that can be created using SetPVarInt & friends.
Actors The number of actors that can be created using CreateActor. (4)
Extra weathers The number of server-side weather types that can be created using CreateExtraWeather. (3)

Name Limit
Players 1000
Vehicles 2000
Objects 1000
Virtual worlds 2147483647
Area ID 255
Classes 320
Map icons 100
Race checkpoints 1
Checkpoints 1
Pickups 4096
Global 3D labels 1024
Per-player 3D text labels 1024
Chat bubble string length 144 characters
Material text string length 2048 characters
Gang zones 1024
Menus 128
Attached player objects 10
Player variables 800
Actors 1000
Extra weathers 32

Server properties

Name Limit
Gamemodes 16
Filterscripts 16
Text input (chat/commands) 128 cells (512 bytes)
Text output 144 cells (576 bytes)
Name length (used by SetPlayerName) 24 characters

Textdraws

Name Description
Textdraws The number of global textdraws that can be created.
Textdraws The number of per-player textdraws that can be created.
Textdraw string length The maximum length a textdraw string may have. (2)

Name Limit
Textdraws 2048
Per-player textdraws 256
Textdraw string length 1024

Dialogs

Name Description
Dialogs The maximum possible dialog ID that can be used by ShowPlayerDialog.
Info (Main text) characters The maximum length the info[] string passed to ShowPlayerDialog may have.
Caption The maximum length the caption[] string passed to ShowPlayerDialog may have.
Input text boxes The maximum length an user input string an input/password dialog may have.
Tab list columns The maximum number of columns in a tablist dialog..
Tab list column characters Maximum length of a column string in a tablist dialog.
Tab list row characters Maximum length of a row string in a tablist dialog.

Name Limit
Dialogs 32767
Info (Main text) characters 4096
Caption 64
Input text boxes 128
Tab list columns 4
Tab list column characters 128
Tab list row characters 256

DL

Name Description
Added atomic models The number of atomic models that can be added through AddAtomicModel or via IDE:objs entries.
Added timed models The number of timed models that can be added through AddTimeModel or via IDE:tobj entries.
Added ped models The number of ped models that can be added through AddPedModel or via IDE:ped entries.
Network resources The maximum number of files that can be made available for download via assets.json, assuming wildcards filtered out.
Assets.json size The maximum size assets.json can have.
CD images The number of CD images (or IMG files) that can be added through AddCdImage.
IDE files The number of IDE files that can be added through AddIDE.
IPL files The number of IPL files that can be added through AddIPL.

Name Description
Added atomic models 30000 (5)
Added timed models 20000 (5)
Added ped models 10000 (5)
Network resources 20000
Assets.json size 2 MB
CD images 64
IDE files 256
IPL files 256

Notes

  • (1): Although the vehicle model limit in UG-MP is unlimited, if you use a large amount of vehicle models, you may notice parts of your mode become framey as vehicle models are dynamically loaded/unloaded. Using too many vehicle models is therefore considered bad practice.
  • (2): Although the textdraw string limit is 1024 characters, if colour codes (e.g. ~r~) are used beyond the 255th character it may crash the client.
  • (3): As of right now streamers do not work with extra weather types.
  • (4): It is highly recommended that you use the IDs efficiently. A streamer can do this for you, and we recommend you to use one on UG-MP.
  • (5): These limits are notably higher than the maximum number of models you can add, and you probably won't ever run into them. The maximum number of models that can be added is not an exact limit - it is completely determined by the number of free model IDs GTA: Underground has. If you manage to run out of them, new models will not be added, an error message appears for each model the game attempts to add on the client and OnAddModelCompleted will not fire for these models.