Jump to content
nanos GbR
Sign in to follow this  
Tarry

[Server Package] Multi-vehicle spawn (and anti-spam-spawn)

Recommended Posts

Allows players to spawn multiple vehicles, max number is configurable.

Server side option to enable/disable spawn-in-vehicle for all players (shouldn't interfere with other packages that do this).

Adds an admin command to block a player from spawning vehicles.

Will despawn vehicles a player attempts to spawn if:

  • The player is already in a vehicle (configurable).
  • The player has been blocked from spawning vehicles .
  • The player has spawned a vehicle within the configurable delay time.

As the vehicle is actually spawned by a standard package it's not possible to prevent the spawn altogether without modifying standard files,

the vehicle will despawn almost instantly, but explosions may still happen.

https://github.com/TarryPaloma/jc3mp-mvs

Edited by Tarry

Share this post


Link to post
Share on other sites

I put it into my server but after doing so, I couldn't spawn any vehicles, only once I removed it I could once again. Is there something wrong with the code or did I do something wrong.

 

Thanks

Share this post


Link to post
Share on other sites

The code works for me.

What other mods do you have?

Any error messages in the console (check during start up and when you try to spawn vehicles)

Share this post


Link to post
Share on other sites

Ugh.. I am but.. I'm still getting to grips with this github stuff and yea.. I wanted to do stuff and.. eh.

I'll reup it for now I guess.

edit: I don't suppose anyone had the readme saved? 😁

Edited by Tarry

Share this post


Link to post
Share on other sites
13 hours ago, Tarry said:

Ugh.. I am but.. I'm still getting to grips with this github stuff and yea.. I wanted to do stuff and.. eh.

I'll reup it for now I guess.

edit: I don't suppose anyone had the readme saved? 😁

Here you go:

Quote

# multivehiclespawn
Mod for JC3MP - players can spawn multiple vehicles (configurable), optional spawn in vehicle, some anti-spam-spawn measures.

Installation - stick the multivehiclespawn directory in your server packages directory

Bonus!
Includes the command /blockvehicles (or /bvs).
Can be used by admins to block a player from spawning vehicles (e.g. if they're being a dick).
Usage:
/blockvehicles <playername>
Each use of the command toggles a player's ability to spawn vehicles.

Options:

Change these in config.json

maxnumberofvehicles -> How many vehicles each player can spawn before they start despawning.
First spawned is first to despawn. Default 4.

autoenter -> Should player be put in a vehicle as soon as they've spawned it? Default false.

canspawninvehicle -> Should player be allowed to spawn vehicles while in a vehicle?
Doesn't always prevent accidents/explosions (not possible without interfering with standard packages)
Default false.

mintimebetweenspawns -> Time in milliseconds a player must wait between spawning vehicles.
Default 5000. (That's 5 seconds ;) )

 

  • Upvote 1

Share this post


Link to post
Share on other sites
Quote

 

As soon as a player joins, this message appears:

[2017-10-27 12:23:36]: /home/[USERNAME]/serverfiles/jc3/packages/multivehiclespawn/main.js:21
    player.freeroam.ownedvehicles = [];
                                  ^

TypeError: Cannot set property 'ownedvehicles' of undefined
    at jcmp.events.Add.player (/home/[USERNAME]/serverfiles/jc3/packages/multivehiclespawn/main.js:21:35)

I have performed a fresh install of the server and mods, to no avail.

Any help?

Edited by Biotic

Share this post


Link to post
Share on other sites

Doesn't seem to be working at all on my server, the packages is where it's supposed to be and all, but nothing happens. /bvs doesn't even work, it's as if the package isn't even there

Share this post


Link to post
Share on other sites

So this is basically a dead post isn't it? I mean servers still use the package but apparently everyone hates me and doesn't want to help ;(

 

jk this is actually a really nice community 

 

send help

Edited by Faceles

Share this post


Link to post
Share on other sites

Relevant info I get when I start up my server in my instance, seems the package.json is screwed up somehow.

 

 No 'package.json' found. Creating default 'package.json'.
[2017-11-25 22:03:02]: main file not found in Package or no suitable language "u                                                                                                                                                             nnamed-jcmp-package" [/jc3/packages/jc3mp-mvs-master/]
[2017-11-25 22:03:02]: Invalid script engine when trying to start package
[2017-11-25 22:03:02]: Could not start package (Script Engine not found?)
 

Share this post


Link to post
Share on other sites

I need Help !!

Error: Cannot find module '../freeroam/gm/config'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (G:\Program Files (x86)\SteamLibrary\steamapps\common\Just Cause 3 Multiplayer Mod Dedicated Server\packages\multivehiclespawn\main.js:4:10)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use.