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

4 years ago

Advertisement
December 05, 2020, 10:01:36 am

Recent Posts

Pages: [1] 2 3 ... 10
1
Suggestions / Re: Add arguments to ClientModulesLoad
« Last post by Kesarion on November 09, 2020, 01:18:37 pm »
wouldn't  this be used in a class that runs on each player ? Also i can see how can cause confusion and maybe some weird behavior.
2
Bug reports / Using Config:GetValue() on a non-existant category crashes the server
« Last post by DaAlpha on November 08, 2020, 09:55:07 pm »
Just like the title says.

While this is probably not an intended use case, I would still prefer if this error was caught since unexpected crashes are hardly beneficial to anyone.
3
Suggestions / Add arguments to ClientModulesLoad
« Last post by DaAlpha on November 08, 2020, 09:25:57 pm »
As of now, the serverside ClientModulesLoad event is essentially useless as there is no way to tell for sure which player it is referring to.

Adding a player argument to this event would make it a lot more useful.
4
Suggestions / Add setting for negative mouse acceleration
« Last post by DaAlpha on November 08, 2020, 09:20:33 pm »
JC2 uses negative mouse acceleration, which is pretty annoying - at least for the more hardcore crowd.

For the singleplayer, there's a .dll mod which disables it: https://justcause2mods.com/mods/mouse-aiming-fix-negative-acceleration/

However, this mod doesn't work with JC2MP and results in a crash during the game initialization.

It would be amazeballs if there was a setting in the settings menu to toggle negative mouse acceleration (in the same way you guys added settings for the stunt camera and camera snap).
5
Bug reports / Render.GetTextSize is not accurate when using scale
« Last post by DaAlpha on November 08, 2020, 09:04:12 pm »
Steps to reproduce:

Code: Lua
  1. print(Render:GetTextSize("This should be the same", 16, 1.5))
  2. print(Render:GetTextSize("This should be the same", 16) * 1.5)

Output:
Code: [Select]
20:57:25 | [info ] | [_test] 267.000000, 24.000000
20:57:25 | [info ] | [_test] 259.500000, 24.000000

My global text scale is set to 1.0.

Additional information:

It seems to jump around in steps, as can be seen using this code:

Code: Lua
  1. local scale = 1
  2. local down  = false
  3.  
  4. Events:Subscribe("Render", function(args)
  5.   local delta = args.delta * 0.1
  6.   if down then
  7.     delta = -delta
  8.   end
  9.  
  10.   scale = scale + delta
  11.   if scale <= 0.5 or scale >= 2 then
  12.     down = not down
  13.   end
  14.  
  15.   local fontSize  = 16
  16.   local text      = "Sample Text"
  17.   local textSize1 = Render:GetTextSize(text, fontSize) * scale
  18.   local textSize2 = Render:GetTextSize(text, fontSize, scale)
  19.   local textPos   = Vector2(Render.Width * 0.5, Render.Height * 0.25)
  20.  
  21.   Render:FillArea(textPos, textSize1, Color.White)
  22.   Render:FillArea(textPos, textSize2, Color.Red)
  23.   Render:DrawText(textPos, text, Color.Black, fontSize, scale)
  24.  
  25.   Render:DrawText(textPos - Vector2(0, 18), string.format("Scale: %.3f", scale), Color.White)
  26. end)

6
Bug reports / Rare clientside "no RTTI data" or "bad_weak_ptr" errors
« Last post by DaAlpha on November 08, 2020, 08:31:30 pm »
On rare occasions, some clients run into access violation errors. I have yet to experience this myself, nor have I managed to figure out a pattern. I know this is very thin grounds to start investigating but I think it's still worth reporting. Maybe someone else has experienced this issue before and can provide more info.

One possible explanation I could imagine is that people are tampering with their game using Cheat Engine for example. But the question remains why it is almost always related to vehicle occupants.

Example 1

Calling Vehicle.GetOccupants on a Vehicle object obtained from a Physics:Raycast (inside a PostTick event)

Code: [Select]
Exception: Access violation - no RTTI data!
  Callstack:
    API function: in upvalue GetOccupants
    client/cHitsync.lua:435: in method CalculateBullet
    client/cHitsync.lua:310: in method InVehicleLoop
    client/cHitsync.lua:158: in function <client/cHitsync.lua:127>

Example 2

Calling IsValid on an object retrieved from Vehicle.GetDriver inside a Render or PostRender event

Code: [Select]
Exception: Access violation - no RTTI data!
  Callstack:
    API function: in global IsValid
    client/cNametags.lua:42: in upvalue func
    ../../lua/autorun/client/cRender.lua:45: in function <../../lua/autorun/client/cRender.lua:42>

Example 3

Inside EntitySpawn:

Code: Lua
  1.   elseif args.entity.__type == "Player" then
  2.     local vehicle = args.entity:GetVehicle()
  3.     if IsValid(vehicle) then
  4.       local driver = vehicle:GetDriver()
  5.       if args.entity == driver then
  6.  

Code: [Select]
Exception: Access violation - no RTTI data!
  Callstack:
    API function: in metamethod __eq
    client/cSeatLocker.lua:68: in function <client/cSeatLocker.lua:61>

Example 4

Calling Vehicle.GetDriver on a vehicle copied (using Copy(), honestly not sure why) from an entity obtained from a Physics:Raycast inside a Render event

Code: [Select]
Exception: Access violation - no RTTI data!
  Callstack:
    API function: in method GetDriver
    client/cCrosshair.lua:198: in upvalue func
    ../../lua/autorun/client/cRender.lua:45: in function <../../lua/autorun/client/cRender.lua:42>
  state: 4
  delta: 0.0057504908181727

Example 5

Calling Vehicle.GetDriver on a vehicle obtained via Player.GetVehicle on a player object obtained from Client:GetStreamedPlayers() inside a Render event

Code: [Select]
Exception: bad_weak_ptr
  Callstack:
    API function: in upvalue GetDriver
    client/cNametags.lua:227: in upvalue func
    ../../lua/autorun/client/cRender.lua:49: in function <../../lua/autorun/client/cRender.lua:46>
  Arguments:
    state: 4
    delta: 0.042030334472656

Example 6

Same context as example 3, one line earlier

Code: [Select]
2020-06-25 21:34:34 UTC+2 | Clientside error occurred in module seatlocker:
Player: STEAM_0:1:64387760 <Mauman> from Czech Republic
Exception: bad_weak_ptr
  Callstack:
    API function: in method GetDriver
    client/cSeatLocker.lua:67: in function <client/cSeatLocker.lua:61>
  Arguments:
    entity: yagsef12345
7
Bug reports / Clientside player state is not updated when local vehicle is removed
« Last post by DaAlpha on November 08, 2020, 07:17:49 pm »
The local player state is not reset back to 4 (OnFoot) when their vehicle is removed. This applies to the client side only.

Steps to reproduce:
  • Enter a vehicle
  • Remove the vehicle using the Vehicle.Remove function
  • Check LocalPlayer:GetState()

Edit: Disregard this one. Just noticed it's a duplicate of https://www.jc-mp.com/forums/index.php/topic,5797.0.html
8
Releases / Steam id finder
« Last post by Kesarion on November 06, 2020, 12:10:05 am »
Code: [Select]
--[[ script that will print the steamid of any player
 /steamid numberid  gives the steamid  of the player that has that id
 /mysteamid         gives the players personal steamid
 ]]--
function mysteamid(args)
 local playerthatasked = args.player
 local words = args.text:split(" ")
 if #words == 1 and words[1]== "/mysteamid" then
if IsValid(playerthatasked) then
local ysrmid= "Your STEAM ID is "
local steamfinder2=playerthatasked:GetSteamId().id
playerthatasked:SendChatMessage(ysrmid..tostring(steamfinder2),Color(100, 149, 237))
end
end
end
function steamfinderothers(args)
 local playerthatasked = args.player
 local playertofind
 local words = args.text:split(" ")
if #words == 2 and words[1] == "/steamid" then
for player in Server:GetPlayers() do
if player:GetId()== tonumber(words[2]) then playertofind = player 
end
end
if IsValid(playerthatasked) and IsValid(playertofind) then -- if both players are online
local steamidfinder1=playertofind:GetSteamId().id
local steaminfotxt =" 's STEAM ID is "
playerthatasked:SendChatMessage(tostring(playertofind:GetName())..steaminfotxt..tostring(steamidfinder1), Color(100, 149, 237))
elseif IsValid(playerthatasked) and not IsValid(playertofind) then -- if the target  player is not online
local playernotfoundmessage= "This player is no longer in the game"
playerthatasked:SendChatMessage(playernotfoundmessage, Color( 255,100,100))
return true
end
end
end

Events:Subscribe("PlayerChat",mysteamid)
Events:Subscribe("PlayerChat",steamfinderothers)

Make a folder with the name of the script and a Server folder in witch you will put all of above with .lua ending.
commands:
 /steamid numberid  gives the steamid  of the player that has that id from the F6 menu with the players.This was done because people can use multiple alphabets and special characters.
 /mysteamid         gives the players personal steamid

Pretty simple
I might add images later.
9
JC2-MP / help error code 2 just cause 2
« Last post by trollman19 on August 08, 2020, 03:29:59 am »
hello I need help buy just cause 2 on steam and opened it and I got an error that said fatal error directX code 2 help please: c
10
Just Cause 2 / help error code 2
« Last post by trollman19 on August 08, 2020, 03:22:51 am »

hello I need help buy just cause 2 on steam and opened it and I got an error that said fatal error directX code 2 help please: c
Pages: [1] 2 3 ... 10