Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

3 years ago

Advertisement
May 31, 2020, 02:59:26 am

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - JasonMRC

Pages: [1] 2 3
1
When in a vehicle, Teleport/SetPosition will place you at your current location if targeted beyond stream range. If not in a vehicle or if the target vector is within stream it will operate correctly.

The changes with 0.2.2 seem to have unearthed this.

2
Bug reports / PlayerState stuck as InVehicle when Vehicle is Removed()
« on: December 16, 2015, 11:36:26 pm »
If you are in a vehicle and the vehicle is removed(by the server) you are of course kicked from the vehicle but your player state is not updated to OnFoot, it remains as InVehicle. This causes things that rely on playerstate to not function(i.e. Wingsuit for one) until the player re-enters and then purposefully exits a vehicle.

This issue has existed in some way for over a year, but just recently been more problematic as Wingsuit relies on the correct player state.

3
Bug reports / 0.2 Server Crashing causing error
« on: November 09, 2015, 09:26:11 pm »
Issue: Server crashes to non-responisive. I have to manually end the server program. Players are kicked and when they attempt to rejoin are given a permanent black screen with no menu access.

Error:
Code: [Select]
14:15:00 | [error] | Lua error in module Management when running event TimeChange:
14:15:00 | [error] |   ...p-server/scripts/Management/server/Management-Server.lua:137: attempt to call method 'SendSystemMessageToPlayer' (a nil value)
14:15:00 | [error] |   Callstack:
14:15:00 | [error] |     API function: in method SendSystemMessageToPlayer
14:15:00 | [error] |     server/Management-Server.lua:137: in method TimedPayout
14:15:00 | [error] |     server/Management-Server.lua:97: in function <server/Management-Server.lua:95>
14:15:00 | [error] |   Arguments:
14:15:00 | [error] |     Day: 9
14:15:00 | [error] |     Month: 11
14:15:00 | [error] |     FifthMinute: true
14:15:00 | [error] |     Minute: 15
14:15:00 | [error] |     Hour: 14
14:15:00 | [error] |     FifteenthMinute: true
14:15:01 | [info ] | [PlayerManager] *[OPS] Player Data Saved: 23,964 in 0.77716 seconds(30,835 OPS)
*** Error in `./Jcmp-Server': realloc(): invalid next size: 0x114c4648 ***

Code line of error:
Code: [Select]
players:SendSystemMessageToPlayer("[Payout]", NotificationColor, "Everyone has received $" .. Format(PayoutAmount) .. ".", Color.White)
Function I meant to call:
Code: [Select]
function System:SendSystemMessageToPlayer(player, title, color, ...)
if not title then title = self.ServerChatTitle else title = title .. " " end
if not color then color = self.ServerChatColor end
player:SendChatMessage(title, color, ...)
end

The event this took place in is a custom time manager. The script fires every x minutes.

Test case:
Code: [Select]
class 'System'

function System:SendSystemMessageToPlayer(player, title, color, ...)
if not title then title = self.ServerChatTitle else title = title .. " " end
if not color then color = self.ServerChatColor end
player:SendChatMessage(title, color, ...)
end

function OnChat(args)
table.print(args)
args.player:SendSystemMessageToPlayer(args.player:GetName(), args.player:GetColor(), ", has joined.", Color.White)
end

Events:Subscribe("PlayerChat", OnChat)

Test case does not replicate server crash, only the script error. I tried to replicate the crash in the same module and same code as the first time but all it did was give the appropriate function call error.

Running the original code correctly does not crash.

I think it may be related to the file save that happened directly before:
Code: [Select]
14:15:01 | [info ] | [PlayerManager] *[OPS] Player Data Saved: 23,964 in 0.77716 seconds(30,835 OPS)This just saves a table to a file. It's been running fine for months. If you need I can show the code that produces this line.

4
Suggestions / world:GetName(), world:GetValue(), and Server:GetWorlds()
« on: October 11, 2015, 03:30:52 am »
Get/Set functions for Name and Value(or just value) for worlds.

Currently there is no way to know exactly what world a player is in, only that they are in one and it either is or isn't the DefaultWorld. The proposed function(s) would make it much easier to enable or disable features in different worlds. When a new world is created you could set its name or its value "Name", then you could have other scripts check for that name and either turn things on or off accordingly.

Code: [Select]
if player:GetWorld():GetValue("Name") == "Racing" then
--create racing music if it doesn't exist
else
--remove racing music if it exists
end

Essentially like how StreamableObjects will now have Values.

Also, would it be possible to have a Server:GetWorlds() iterator? Currently, AFAIK, you have to keep track of every world via a variable otherwise it could get lost.

5
Releases / [Release] WaterWalk v1.0
« on: July 22, 2014, 05:49:20 am »
WaterWalk
Walk, Drive, Fly - on water!
Version 1.0


Description
WaterWalk allows you to walk, drive, or land a plane or helicopter on water. Boats are not affected by this and you can easily enter a boat and it will operate like normal or exit a boat and stand on the water.

'/waterwalk' enables and disables it by default, but this command can be changed in the config.

Configuration
There is little to configure, but the changeable things are in /client/WaterWalk-Client.lua

Please let me know of any bugs/glitches.


To see it in action, go to my server:
:: Problem Solvers FreePlay ::
IP Address: 216.108.230.23

Changelog
7-22-14 Fixed a strange issue most prevalent on locally hosted servers that caused the surface to not have a collision. This was fixed by adding the full filepath to the collision.

Enjoy!

6
Releases / [Release] TimeChange Event Extension v1.0
« on: July 22, 2014, 12:09:55 am »
TimeChange
An Event Extension script.
Version 1.0

Description
While working on a feature for my server I came upon the need to figure out when exactly the day changed or an hour changed. I found uses for this in a few modules so instead of replicating that code into each module, I created a module to handle the checking of this and then fire an event. The file is in shared so that both clients and the server have access to it.

This is useful if you want something to happen every hour or minute, at specific hours/minutes, daily, etc. It is also a suitable replacement for long timers which are normally on tick. If you have a 20 minute timer that doesn't have to be second-accurate, using this will allow that function to operate within a minute accuracy and will save the server from having to check that function every tick for those 20 minutes.

Some future releases of mine may require TimeChange. If so they will say such in their config.

Note: This isn't a script that most freeroams would have use for. It is for use by scripters to help manage time-sensitive functions.

Description
TimeChange is a backend module designed to be loaded and let run.
TimeChange adds two events to both Server and Client, These events are:
"TimeChange" and "SecondTick"
Both contain a table.

"TimeChange"
Code: [Select]
Name, Always contained, Type, Description
args.Minute, Yes, Number(0-59), The current minute
args.Hour, Yes, Number(0-23), The current hour
args.FifthMinute, No, Bool, If the event happened on a minute divisible by 5
args.TenthMinute, No, Bool, If the event happened on a minute divisible by 10
args.FifteenthMinute, No, Bool, If the event happened on a minute divisible by 15
args.HalfHour, No, Bool, If the event happened on a halfhour(beginning or middle of the hour)
args.HourChange, No, Bool, If the hour has changed.
args.QuarterDaily, No, Bool, If the hour is a quarter of the day(Happens at 0, 6, 12, and 18 hours)
args.DayChange, No, Bool, If the day has changed(Happens at midnight).

"SecondTick"
Code: [Select]
Name, Always contained, Type, Description
args.Second, Yes, Number(0-59), The current second
args.Even, Yes, Bool, True or False if the second is even.

Configuration
The file should always be in shared. You can change the two top variables to false to make it not run on clients or not run on the server(setting both to false will of course make the script do nothing).

DO NOT UNDER ANY CIRCUMSTANCES PUT THIS FILE IN AUTORUN!
Doing so will cause it to run in EVERY module, and thus the events being fired once for each module(Example: if you have 10 modules, each minute there will be 10 TimeChange events, this could potentially cause MASSIVE adverse effects).


Please let me know of any bugs/glitches.


Changelog

Enjoy!

7
For those affected by the Steam Download Bug, I have uploaded a current, clean, copy of both the Client and Server Files.

Client
Current Version: 0.1.4a (Build 875)
Download Link: Google Drive

Server
Current Version: 0.1.4a (Build 747)
Download Link: Google Drive

If you need an Unzipping program, I suggest 7-Zip. It is a free, open-source zip program.

Once downloaded, simply copy the contents of these folders into your existing JC2-MP folder.

Hopefully the Steam servers will be up again soon, but even when they are I intend to keep this updated incase the problem arises again or for some reason someone can't download from steam.

If you have any questions feel free to post and I or another experienced JC2-MP veteran will help you to the best of our ability.

8
This is a general question to figure out the best way to get a player's name from a chat string.

When typing someone's name in chat to interact with them(send money, warp, pm, rank up, etc) what do you do?
Type the full name out manually?
Code: [Select]
/sendmoney BobTheBraveType part of the name and hit enter?
Code: [Select]
/sendmoney braveType the beginning and then hit tab to autocomplete it?
Code: [Select]
/sendmoney bob(Hit Tab) >> /sendmoney BobTheBrave
Explanation behind your choice would be nice, but not needed.
Thanks.

9
Releases / [Release] SAMManager v1.0
« on: May 28, 2014, 02:47:19 am »
SAMManager
A simple open-source SAM system.
Version 1.0


Description
One of the things many players have missed since release is SAMs. There's just something neat about them. Previously only a few servers had figured out how to run them, now any server can have SAMs.

SAMs will fire at any player in a plane or Helicopter who gets close enough.

Note: While this system is completely standalone and perfectly able to be ran on a normal Freeroam server, it is really best used as a base for a more advanced server feature.
Note II: This system does not include Flares nor Damageable SAMs. I am waiting on entity:SetValue() to release a Damageable SAM system.
Note III: This system was originally based off of Trix's Missile Script, however it is hardly recognizable from that now.

Configuration
Configuration of SAM stats is in shared/StatsTable-SAM. All other config is in shared/Config.lua.
Location of SAM Sites is in shared/Config.lua in the table 'SAMAnchorLocationsTable'. By default these contain all of the game sites(thanks to Trix for the list).


Suggestions are welcome!
Please let me know of any bugs/glitches.


You can go to my server to play or test a variant of this script, Faction SAMs.
::Problem Solvers::
IP Address: 173.233.189.162:7777

Changelog

Enjoy!

10
I have ran into the issue of needing to get all the players in a vehicle and what seat they are in. vehicle:GetOccupants() returns a table with all the occupants, however I have no way of knowing what seat they are in. I can check the vehicle's driver, but I can't check the other seats.

Could we either have:
Code: [Select]
player:GetSeat()Which returns either the seat number or nil if they're not in a vehicle?

or
Code: [Select]
vehicle:GetOccupants()Which returns the same table as it currently does, but the key is the seat number instead of an auto-incremented integer.

Either or both of these would be much appreciated. If it comes down to one or the other, I would prefer player:GetSeat()

If there is already a feature that allows this please post an example usage.

11
Releases / [Release] Bounties Plus v1.2
« on: May 02, 2014, 08:45:05 pm »
Bounties Plus
The most intuitive Bounty system.
Version 1.2

Description
Bounties Plus is a homebrew version of the popular bounty scripts, written entirely from scratch.

Bounty Hunter Scores
Every bounty placed and claimed is now logged, so every player has a Bounty Hunter Score. The data is stored in the Database and also set to player's values and broadcast internally as a BountyTable.

Karma!
Everyone loves Karma! Well, except for those who get hit by it! Karma is a new twist on the Bounty concept - if PlayerA sets a bounty on PlayerB and PlayerB then later kills PlayerA, PlayerB will receive the bounty set on them by PlayerA. This makes Targets much more willing to Hunt for their Hunters.
No one knows who set which bounties on who, so it is still anonymous to a point.

Player Values
This system uses the new PlayerValue system introduced with Update 0.1.4.
The following PlayerValues are used:
"BountyAmount": The player's total bounty, in number. This will be 0 if they have no bounty.
"BountyScore": The player's bounty score, in string(claimed .. "/" .. set). This will be "0/0" until a bounty is claimed or set by that player.
"BountyDisplay": A combination of the Bounty amount and score, in string("$500 (2/7)"). This will be ("$0 (0/0)") if they have no score or bounty.

Inter-Module Compatibility
This system was designed for inter-module compatibility. The table broadcast by this system is easy to listen to with a simple Events:Subscribe("PluginBountyManagerBroadcast").
Example code:
Code: [Select]
Events:Subscribe("PluginBountyManagerBroadcast", self, self.PluginBountyManagerBroadcast)

-- Returns the Bounty Table sent by BountiesPlus.
-- .Bounty, .Claimed, .Set
-- Use: BountyTable[SteamId]
function PluginManager:PluginBountyManagerBroadcast(args)
BountyTable = args
-- print("Plugin: BountiesPlus- Info Received.")
end

To iterate through all Bounty info do:
Code: [Select]
for k,v in pairs(BountyTable) do
print("Player SteamID",k)
print("Bounty",v.Bounty)
print("Set",v.Set)
print("Claimed",v.Claimed)
end

Chat Commands
'/bounty set <amount> <player>' To set a bounty.
'/bounty del <player>' To remove your bounty, if any, from the player.
'/bounty stats' To see your Bounty Score and current bounty, if any.

Configuration
All Config can be found in the top 15 lines of the Server file Init.

Please let me know of any bugs/glitches.


To see it in action, go to my server:
:: Problem Solvers FreePlay ::
IP Address: 216.108.230.23

Changelog
6-7-14
Any string can be attempted as player name now and if a player of the name is found the bounty will be placed. If more than one player is found it will list all possible candidates.
6-19-14
Fixed an issue that allowed players to set negative bounties to add money to themselves and remove it from whoever claimed the bounty. This is a major issue which has been prevalent but mostly unknown of in all bounty systems until now. Thanks to hipio for notifying me of this issue.

Enjoy!

12
Essentially the same system used on players, but for staticobjects. This would allow us to give objects attibutes(HP for example).

staticobject:SetNetworkValue()
staticobject:SetValue()
staticobject:GetValue()

Vehicle:SetNetworkValue() would also be useful.
If it's possible to add the custom value system to staticobjects and vehicles it would be much appreciated. :)

13
With custom Damage Systems becoming more of the norm for advanced servers(I know atleast BFP, RLRP, and mine use one), there needs to be a way to damage a player but blame/give credit for the kill to another player.

Currently we must use this:
Code: [Select]
damagedPlayer:SetHealth(damagedPlayer:GetHealth() - DamageReceived))
Quote
damgedPlayer died!

I suggest a new function, player:Damage()
Quote
player:Damage(<damage amount>)
player:Damage(<damage amount>, <DamageReason>)
player:Damage(<damage amount>, <DamageReason>, <ResponsiblePlayer>)

So in operation we would use:
Code: [Select]
playerA:Damage(0.5)
Quote
playerA took 0.5 damage!
Quote
playerA died!

Code: [Select]
playerA:Damage(0.5, 3)
Quote
playerA took 0.5 damage from an Explosion!
Quote
playerA died from an Explosion!

Code: [Select]
playerA:Damage(0.5, 3, playerB)
Quote
playerA took 0.5 damage from playerB's Explosion!
Quote
playerA felt the power of explosions from playerB's!

As far as I know there is no way currently to set a player's death reason and killer. If there is please tell me.

The quotes are to show what the use of this would allow, obviously this function in and of itself would not show that. The Function is intended to set the DamageEntity and Killer in the PlayerDeath event.

14
JC2-MP / [Survey] What do you like in a server?
« on: April 04, 2014, 07:01:41 pm »
Two simple questions just to get the forum community's opinions:

What draws you to a server?
What keeps you on a server?

15
Bug reports / World:GetPlayers() does not Iterate?
« on: March 29, 2014, 03:36:52 am »
Code: Lua
  1. local PlayerCount = 0
  2. for players in DefaultWorld:GetPlayers() do
  3. print("+1")
  4. PlayerCount = PlayerCount + 1
  5. end

Will result in PlayerCount being 0, regardless of the amount of players in the world. The Print never fires so that tells me the loop isn't running. No errors though. The WorldObject is valid, when it isn't it throws an error. I've tried it with both DefaultWorld and one created, both give no errors and don't work.

Pages: [1] 2 3