Author Topic: Vehicle Remove  (Read 1366 times)

because I don't think this has been requested/made.

Whereas, the player leaves the server, all of his/her vehicles are cleared.
I would need this for things and other would too.

because I don't think this has been requested/made.

Whereas, the player leaves the server, all of his/her vehicles are cleared.
I would need this for things and other would too.
Why not an option for bricks aswell? /support

I support. It's annoying to get to a server where people didn't clear up their toys, leaving no fun for anyone else. For God's sake, the vehicle limit is over the player limit and I STILL can't get myself a vehicle!

I shall grant you support!

Good idea, and good idea Jubel

because I don't think this has been requested/made.

Whereas, the player leaves the server, all of his/her vehicles are cleared.
I would need this for things and other would too.
Gravity Cat's fort warz? We were adminless and pinned against the horrors of the 20 max vehicles. Then after much struggle(waiting for Heed to come on after like 15 min), he used his D-wand to fight against the vehicle hoggers and regained the right to spawn a vehicle for all the land.

So yeah, this would be good.

I hereby support this proposal.

It's a good idea, if you want their bricks to stay.
Why not an option for bricks aswell?
Already exists.
Look around on RTB's server mods list.
Two birds with one stone.

Here you go.
Code: [Select]
package clearToys
{
function GameConnection::onClientLeaveGame(%client)
{
for(%i=0; %i < %client.brickGroup.getCount(); %i++)
{
%brick = %client.brickGroup.getObject(%i);
if(%brick.getDatablock().getName() $= "brickVehicleSpawnData" || %brick.getDatablock().getName() $= "SmallVehicleSpawnData" || %brick.getDatablock().getName() $= "SuperSmallVSData")
                   {
                    %brick.killBrick();
                   }
}
Parent::onClientLeaveGame(%client);
}
};
activatePackage(clearToys);

I'm pretty sure I did everything right, but I am not in a position to test it.
Someone do it for me, please.
Script_RemoveVehicles

I'm pretty sure I did everything right, but I am not in a position to test it.
Someone do it for me, please.
Script_RemoveVehicles
Works quite well, will it be released as an add-on?

I have an additional suggestion, if the player leaves with vehicles, server not only removes them, but records them, thus', when the player rejoins, his vehicles are placed back automacly, without removing the brick at all.

Works quite well, will it be released as an add-on?
I might as well put it in the Add-Ons section.
I have an additional suggestion, if the player leaves with vehicles, server not only removes them, but records them, thus', when the player rejoins, his vehicles are placed back automacly, without removing the brick at all.
I'm sure that's possible, because it's been done before, but with player positions.

its already made look on rtb

Here you go.
Code: [Select]
package clearToys
{
function GameConnection::onClientLeaveGame(%client)
{
for(%i=0; %i < %client.brickGroup.getCount(); %i++)
{
%brick = %client.brickGroup.getObject(%i);
if(%brick.getDatablock().getName() $= "brickVehicleSpawnData" || %brick.getDatablock().getName() $= "SmallVehicleSpawnData" || %brick.getDatablock().getName() $= "SuperSmallVSData")
                   {
                    %brick.killBrick();
                   }
}
Parent::onClientLeaveGame(%client);
}
};
activatePackage(clearToys);


Please replace %brick.killBrick(); with %brick.setVehicle(0);