A way to add more than 2000 vehicles on the map
#1

Hi guys,

I'm searching for a way to add more than 2000 vehicles to the map.
I know that SAMP 0.3c has a built-in streamer for vehicles, but I need more vehicles than 2000.
I wanna create a housing system that has a maximum of 10 vehicles per house and the total number of houses is 800.

So I need to spawn over 8000 vehicles, but SAMP only lets me create 2000 vehicles.
8000 vehicles are needed to work for the houses, plus there are over 200 vehicles already spawned on the map of my GM for doing jobs.
So, I would perhaps need 9000 vehicles.

Up to vehicle 2000, all works fine.
The last vehicle-id is 1999.
When I create one more vehicle, the vehicle-id is suddenly 65535 (invalid vehicle id).

Are there vehicle streamers that can work for SAMP 0.3c?
I've found Double-O-Stream and [INC] tAxI's Advanced Vehicle Streamer/Commands already, but do they work on 0.3c?

EDIT: TAXI's streamer link is dead, so cannot use that one.
Reply
#2

If you're gonna use a streamer and you want to reach the 8000, impossible.
Your request is impossible.
Reply
#3

Yeah i think it's impossible, and why would you need 10 vehicles per house? Isn't it a bit much?
Reply
#4

Just make the house icons + vehicle dissapear once the player is offline or just the vehicles.

I know Argonath RPG is using that system with removing the vehicle, and they have over 3k in total.
Reply
#5

Impossible, but it depends on the amount of players.

What a vehicle streamer does is that it only creates the vehicle where a player is near,
so if there are 50 players, each staying at their own house, there won't be any more vehicle created.
Reply
#6

I was asked to create a carpark for the houses in my GM.

The idea of the person who requested this, was to let the player park 2 vehicles outside his house, and the other 8 on a carpark somewhere.


How do most housing systems do it?
Just have a maximum of 2 spawnpoints outside the house for the vehicles (or perhaps 1, to allow more houses)?


My original idea was to allow only one parked vehicle near the house and the other 9 just data-wise in an array.
When the player wanted to have another vehicle parked at his house (the house holds up to 10 vehicles), the spawned one is destroyed (but the data, like paintjob, applied components and such are saved) and the chosen one is spawned instead.

So the 8000 vehicles could still be bought by the players, but only 800 of them could be spawned simultanously.
The vehicles should stay spawned, even if the player logs out, so other players can see the wealth (kinda) of a player when he drives near the other player's house.

TM does this too, vehicles are parked outside the houses, even when the players aren't online.
Reply
#7

So, having more than 2000 vehicles is just impossible?
Even with a streamer?
Reply
#8

Kinda yes. There might be or not a way to get more cars.
Reply
#9

If you would only load the 20 closest vehicles for every player, the server can never crash. (100 players * 20 = 2000)

however if your server needs to hold 500 players, you may only load 4 vehicles per player.

It is possible. Why not?

You can theoreticly have unlimited vehicles.
Reply
#10

Quote:
Originally Posted by ғαιιοцт
Посмотреть сообщение
If you would only load the 20 closest vehicles for every player, the server can never crash. (100 players * 20 = 2000)

however if your server needs to hold 500 players, you may only load 4 vehicles per player.

It is possible. Why not?

You can theoreticly have unlimited vehicles.
Then I would need to make a custom streamer myself to get this done (only loading the closest 20 vehicles for every player).

This would be difficult I guess.
And would take alot of extra processing power.
SAMP is already streaming vehicles. If I would add a loop (that runs every second or so) that loops through all players (50 or 100, depending on what you set it to) AND all vehicles (8000) and calculate the distance between all of them and spawn/delete them when needed, I guess it's not worth the effort.


I could just make 750 houses then, while each house can have 2 parking spots. But then the maximum houses will be limited to 750 forever.
That would be 1500 player-owned vehicles. This leaves 500 static vehicles that can be spawned for missions.
That would be enough for me.
Or up to 1500 houses, each with only 1 parking spot, don't know yet what the best idea would be.

The idea of the carpark is just impossible to do then, or it requires alot of extra code (custom streamer, written in pawn as I don't know how to create .dll plugins) and processing power.

I tested this by adding 4000 vehicles.
The server didn't crash, it just had reached the maximum limit for vehicles.
I don't think there were 4000 vehicles spawned, because the /car command wasn't working anymore (didn't spawn a new vehicle).
SAMP just prevented the spawning of a new vehicle when the amount got over the limit.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)