Well my server is setup to where if a player spawns a vehicle there last spawned vehicle is automatically removed.
I would to receive help on properly removing all players from that vehicle, Which means each seat, And hopefully no loop, And nothing that will alter data usage.
In the commands I added a simple array to store the vehicle.ID in, This array never gets cleared 'So far', Unless I plan to remove the vehicle on player part. So when the player spawns another vehicle that vehicle is automatically removed, Even if it belonged to another player 'Same array value, player.ID etc etc..
Code: [Select]
Now this is setup to prevent data usage, lag and so on.. Max limits on vehicles, command spaming vehicles into the server. Prevent server crashing.. blah blah blah....
If someone could help me with the concept of how I should go about scripting it, And maybe how I should add it to the server. I would be really happy.
Last I checked if a player/players happens to be in a vehicle and it is removed, This results in death and possible rage, Maybe even a /quit
I would to receive help on properly removing all players from that vehicle, Which means each seat, And hopefully no loop, And nothing that will alter data usage.
In the commands I added a simple array to store the vehicle.ID in, This array never gets cleared 'So far', Unless I plan to remove the vehicle on player part. So when the player spawns another vehicle that vehicle is automatically removed, Even if it belonged to another player 'Same array value, player.ID etc etc..
if (Added_Vehicle[player.ID] > 0)
{
local vehicle = FindVehicle(Added_Vehicle[player.ID]);
if (vehicle)
{
vehicle.Remove();
}
};
Now this is setup to prevent data usage, lag and so on.. Max limits on vehicles, command spaming vehicles into the server. Prevent server crashing.. blah blah blah....
If someone could help me with the concept of how I should go about scripting it, And maybe how I should add it to the server. I would be really happy.
Last I checked if a player/players happens to be in a vehicle and it is removed, This results in death and possible rage, Maybe even a /quit