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:

3 years ago

May 27, 2020, 02:32:16 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 - Darwood37

Pages: [1] 2 3 ... 10
Bug reports / ShapeTriggerEnter and Exit does not always fire
« on: December 30, 2016, 10:12:45 pm »
I have several Shapetriggers setup and seem to work for the most part. If I am skydiving or wingsuiting and just as i am about to enter the trigger zone deploy my parachute the ShapeTriggerEnter event will not fire. After which no ShapeTrigger event will fire (Enter or Exit) unless i leave the area greater than the stream distance and return. If i return the same way it will not fire, if i return via a vehicle or on foot it is fine.

Scripting support / Visually see the TriggerType.Box or Sphere
« on: December 26, 2016, 01:54:15 am »
How would i visually see the TriggerType when using ShapeTriggers. I would like to render them so that i can actually see where they are located, their size and positioning instead of a mental picture in my head. Thank you.

Scripting support / help blocking ags.input on a LocalPlayerInput function
« on: December 25, 2016, 03:04:38 pm »
Firstly, Merry Christmas.

I am setting up a passive zone. Everything works well except for the fact that if you continue firing while on foot or in a vehicle and enter the passive zone the args.input in the LocalPlayerInput function does not block the action. If the player stops firing and tries to fire again then it will block the action. The whole time the finger is on the trigger the action will not be blocked. Is there a workaround for this. While the player can still fire under this circumstance he will not cause damage. I want it so that it will stop the player from firing just as if he was already in the passive zone and tried to fire. Cheers.

Scripting support / set angle to point to a position
« on: December 13, 2016, 02:36:20 am »
Nee a little help. I have an NPC that i want to face towards a certain Vector3 position that is constantly changing. How would I calculate this. Cheers.

Bug reports / Serving crashing bug in SQL bind error.
« on: November 27, 2016, 06:55:09 pm »
I made a small typo when binding a value to insert into our servers SQL database. It crashed the server. My function is below
Code: [Select]
function flashlight:SaveSettings(args, player)
if args == nil then return end

local player = player
local steamid = player:GetSteamId().id

local SetNew = SQL:Command("INSERT OR REPLACE INTO flashlight (steamid, elavation, r, g, b, ca, la, multi, radius) VALUES (?,?,?,?,?,?,?,?,?)")
SetNew:Bind(1, steamid)
SetNew:Bind(2, args.elavation)
SetNew:Bind(3, args.r)
SetNew:Bind(4, args.g)
SetNew:Bind(5, args.b)
SetNew:Bind(8, args.multi)
SetNew:Bind(9, args.radius)

The number 1 binding value was nil as i had typed SteamID instead of steamid. When the script called this function my server crashed.

Scripting support / Is Valid()
« on: August 30, 2016, 03:45:22 am »
For some strange reason since the last update or two my client side code no longer worked, i keep getting the self.player as not valid.

Code: [Select]
if self.player ~= nil then
if type(self.player) == "userdata"  and IsValid(self.player) then
Network:Send("Announce", {ply = self.player, time = time, message = message, color = self.textcolor})
Chat:Print("Private admin announcement to " .. tostring(self.player:GetName()) .. " sent.", Color(50, 255, 50))
Chat:Print("Private admin announcement not sent, player not found.", Color(225, 0, 0))

Network:Send("Announce", {time = time, message = message, color = self.textcolor})
Chat:Print("Admin announcement sent to all players.", Color(50, 255, 50))

self.player is valid but i get the message "Private admin announcement not sent, player not found." I can self.player:GetName(), self.player:GetColor() etc but nothing in the above snippet. I pass the player from the server. Cheers.

00:20:42 | [error] | Lua error in module achievements when running event NetworkObjectValueChange:
00:20:42 | [error] |   Runtime Error: Player:SetMoney cannot be used inside the PlayerMoneyChange event!
00:20:42 | [error] |   Callstack:
00:20:42 | [error] |     API function: in method SetMoney

I am getting the following error. I am not setting the money inside the event, I am setting a NetworkValue on a player and the NetworkObjectValueChange event is where the money is set. This error is not happening for all players, very few.

Scripting support / Showing an image after disconnect
« on: August 05, 2016, 07:16:09 am »
IS there anyway to show an image or keep an image displayed after the client has disconnected? I want to customize my ban and kick messages, make it more than just a window with some text in it. Cheers.

Scripting support / Changing vehicle names autorun
« on: July 28, 2016, 09:59:49 pm »
Because i am getting old and forgetful can someone show me how to intercept the Vehicle:GetName() on the client or server function through the lua/autorun so that i can check what templates have been applied and return the correct name of the vehicle. I am currently using this snippet on my client script that shows vehicles names, damage and icons but I need it in other scripts so rather than add the same code many times. thanks.

Code: [Select]
if vehModelId == 11 and vehtemplate == "Police" then
name = "Shimuzu PI Service"

if vehModelId == 36 and vehtemplate == "Civil" then
name = "Shimuzu Freerunner"

if vehModelId == 36 and vehtemplate == "Sport" then
name = "Shimuzu Tracline"

if vehModelId == 36 and vehtemplate == "Gimp" then
name = "Shimuzu ATV55T"

if vehModelId == 44 and vehtemplate == "Cab" then
name = "Hamaya Oldman Cab"

if vehModelId == 78 and vehtemplate == "Cab" then
name = "Civadier 999 Cabriolet"

if vehModelId == 91 and vehtemplate == "Cab" then
name = "Titus ZJ Cabriolet"

if vehModelId == 91 and vehtemplate == "Softtop" then
name = "Titus ZJ Soft Top"

if vehModelId == 18 and vehtemplate == "Cannon" then
name = "SV-1007 Stonewall"

if vehModelId == 40 and vehtemplate == "Crane" then
name = "Fengding EC2 Lift"

if vehModelId == 1 and vehtemplate == "Classic_Cab" then
name = "Dongtai Agriboss 9000"

if vehModelId == 1 and vehtemplate == "Modern_Hardtop" then
name = "Dongtai A-B Decalux"

if vehModelId == 1 and vehtemplate == "Modern_Cab" then
name = "Dongtai A-B Century"

if vehModelId == 66 and vehtemplate == "Double" then
name = "Dinggong 268D"

if vehModelId == 87 and vehtemplate == "Cab" then
name = "Wilforce Range X"

if vehModelId == 87 and vehtemplate == "Softtop" then
name = "Wilforce Trek II"

if vehModelId == 46 and vehtemplate == "Cab" then
name = "MV Command"

if vehModelId == 46 and vehtemplate == "Combi" then
name = "MV Quartermaster"

if vehModelId == 46 and vehtemplate == "CombiMG" then
name = "MV Quartermaster"

if vehModelId == 84 and vehtemplate == "Cab" then
name = "Marten Storm III-2"

if vehModelId == 38 and vehtemplate == "Djonk01" then
name = "Kuang Sunrise2"

if vehModelId == 38 and vehtemplate == "Djonk02" then
name = "Kuang Sunset"

if vehModelId == 38 and vehtemplate == "Djonk03" then
name = "Kuang Adventure"

if vehModelId == 38 and vehtemplate == "Djonk04" then
name = "Kuang Homestead"

if vehModelId == 5 and vehtemplate == "Softtop" then
name = "Pattani Gluay Touring"

if vehModelId == 5 and vehtemplate == "Fishing" then
name = "Pattani Gluay Pro 2"

Scripting support / many vehicles in city causes client crash
« on: July 26, 2016, 02:39:45 am »
I have been experiencing frequent client crashes when teleporting out of the city area. Today i decided to do some testing and removed all the vehicles within a 2500m radius of the area i was at in the city. The client no longer crashed.  My question, is there any easy way to check what vehicles are currently residing in the city areas. I want to remove about 50% of them but this would mean i would have to manually go through the freeroam spaws,txt file, cross checking each vehicle position and delete them. Can anyone assist me in making this an easier process. Thank you.

Troubleshooting / Server browser and featured bullet list
« on: July 22, 2016, 11:32:02 am »
For the past couple of months i have been experiencing an issue with the server browser and featured bullet list in JC2MP. The only way to temporarily fix this is to turn my cable modem on and off. What is happening is that the server browser does not always show all the servers available and when i hit refresh on the internet tab i will get a different list of servers each time. The bullet featured list begins to shrink, 4 bullets, three, two and then eventually none will show until i reboot my modem. This happens over the course of a day or two.

I am located on the east coast of the USA. I am using a Netgear Nighthawk X6 R8000 router along with an Arris SB6190 cable modem, I have extremely fast internet service which apart form JC2MP seems to be working flawlessly for everything else. I made no changes of any kind when the started to happen. Thank you.

Bug reports / PlayerInput and Actions
« on: July 18, 2016, 11:07:31 pm »
When i use the machine guns on the Poloma Renegade(7-no template) and Traver-Z(35-FullyUpgraded) with a gamepad it will not recognize Action.FireLeft and Action.FireRight, with a mouse and keyboard it works fine. Instead when I reverse and accelerate (Physically in the game) with the gamepad it is recognizing the above actions in the LocalPlayerInput function. There is a strong possibility i am missing something in the way this is supposed to work, gamepad v m&K etc. Please enlighten me if this is the case. thank you.

Also with the gamepad it will randomly execute these two above actions when just looking around, right thumbstick. Thanks.

Scripting support / Moving a vehicle
« on: March 19, 2016, 01:16:29 pm »
What would be the most efficient way of moving a vehicle that you want to follow the vehicle you are currently driving or flying, with an offset of a few metres behind or below. Thank you.

Scripting support / default help script
« on: February 14, 2016, 10:35:35 am »
I have noticed this issue with the default help script for some time and thought i would ask if anyone else has seen this. Randomly, differs from one connection or reload to the next. The text that is shown on the tab page will display over the top of each other. See my screen shot below:

This is my help file script for the help shown in the img:

Code: [Select]
function ModulesLoad()
    Events:Fire( "HelpAddItem",
            name = "JC2 MP Pong",
            text =
                "Just Cause 2 Multiplayer Pong\n\n" ..
"Type the following commands in chat to play:\n" ..
"/pong [difficulty]\n" ..
"Difficulties: Amateur, Easy, Medium, Hard, Veteran, Pro\n\n" ..
"While playing Pong your player will be in passive mode, this means you cannot be killed/harmed or kill/harm other players.\n\n" ..
"Instructions:\n" ..
"You against the CPU. First one to win 5 games wins the match. There are no limits to the number of matches you can win\n" ..
"Use your mouse to move your bat, Press Space to pause the game.\n" ..
"While playing hit the X key to exit. Hit the H key for help.\n" ..
"Once you have won a match you can press the C key to continue playing pong at your current difficulty level.\n" ..
"To select another difficulty level you must exit your current game by pressing X then type /pong [difficulty] in chat again.\n\n" ..
"Only your highest score no matter what difficulty level will be saved.\n" ..
"The game keeps track of the overall high score and if you manage to beat it you will receive $2500 to use in game via the buy menu.\n\n\n\n" ..
"Original pong script by JaTochNietDan and modified extensively by Darwood37."

} )

function ModuleUnload()
    Events:Fire( "HelpRemoveItem",
            name = "JC2 MP Pong"
        } )

Events:Subscribe("ModulesLoad", ModulesLoad)
Events:Subscribe("ModuleUnload", ModuleUnload)

Like i said it is completely random, if i reload the help script this may appear on another tab page and this one will be fine. It has been happening prior to 0.2. Cheers.

Pages: [1] 2 3 ... 10