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
December 06, 2019, 07:07:04 am

Recent Posts

Pages: [1] 2 3 ... 10
1
Troubleshooting / Problems with JC2MP when using VPN
« Last post by ZKelo on October 12, 2019, 09:04:15 pm »
When trying to play JC2MP, sitting under a VPN there are problems. When connected to a server, everything seems to be going fine - the connection to the server is successful, my character seems to spawn, but there is no connection with the "outside world". The player connecting from under the VPN is not on the map for other players, as well as this player does not have other players on the map. This occurs because of the VPN, because, as it was found out, when connected without a VPN, everything works fine. Is this a VPN or JC2MP problem? Has anyone encountered this?

P.S. For some reason, I cannot afford to disable the VPN. Is there any other solution?
2
JC2-MP / Re: Alpha's Salt Factory's Server Staff is horrible!
« Last post by spartanwarrior22 on October 09, 2019, 02:09:14 am »
Boo hoo hoo. Follow the rules and quit being such a baby.
3
Processed / Re: Account deletion request
« Last post by Woet on October 02, 2019, 04:35:07 pm »
Done.
4
Processed / Account deletion request
« Last post by sammeyer1 on September 27, 2019, 02:38:39 am »
Since I'm having no luck with PMs, I'll leave a topic here as a formal request for account deletion.  :)
5
Releases / Re: [Release] Basic Anti-Cheat
« Last post by keeri on September 16, 2019, 03:22:27 pm »
the server module runs in a single instance (not per player like the client modules do), so having
Code: [Select]
self.phealth = 1on the server means it will get overwritten by each player; if you want to store values per-player, use sender:SetValue(key, value) and sender:GetValue(key). you can also use a table of player values:
Code: [Select]
self.phealth = {}

self.phealth[ sender:GetId() ] = sender:GetHealth()
but you will need to manually clear them on PlayerQuit event by setting their value to nil.

Code: [Select]
function GodCheck:CheckThisPlayer( args, sender )
self.phealth = sender:GetHealth()
if sender:GetHealth() >= self.phealth then
that's equivalent to "if true then", since you overwrite the previous value with current value before performing the checks
6
Releases / Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Last post by Kesarion on July 31, 2019, 09:19:44 pm »
THANK YOU !
I'll give it a try
Edit : It worked ! Thank you DaAlpha !
7
Releases / Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Last post by DaAlpha on July 31, 2019, 09:07:18 pm »
It would have helped if you would have given the exact error message and specified to which line in your snippet it corresponds.

That being said, I am pretty sure the issue starts in line 29 where you are trying to bind argu.position. Bind() only takes a number or a string as second argument, argu.position is userdata though (an instance of Vector3 to be exact, assigned in line 20). If you want to store it, you have to store its x, y and z values in separate columns (and of course put them back together when you retrieve them in your other module). The same applies to argu.angle, argu.tone1 and argu.tone2.

I am also pretty sure you can not bind nil values but that is exactly what's going to happen in lines 40 and 42 if item:GetDecal() or item:GetTemplate() returns nil. If you want to store an empty value, don't bind that placeholder.
8
Releases / Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Last post by Kesarion on July 31, 2019, 08:20:50 pm »
I need some help!
I'm trying to modify the ABM so write to sql so that another script can use that info.
I have edited the executevehicle function on server side to this
Code: [Select]
function BuyMenu:ExecuteVehicle( player, item, tone1, tone2 )
    if player:GetState() == PlayerState.InVehiclePassenger then
        return false, "You cannot purchase a vehicle while in the passenger seat!"
    end

    if IsValid( self.vehicles[ player:GetId() ] ) then -- if driving a vehicle remove that
        self.vehicles[ player:GetId() ]:Remove()
        self.vehicles[ player:GetId() ] = nil
    end
    local argu = {} -- args is the table that contains all the vehicles values
    argu.model_id           = item:GetModelId()

if item:GetTemplate() ~= nil then
argu.template = item:GetTemplate()
end

if item:GetDecal() ~= nil then
argu.decal = item:GetDecal()
end
 argu.position           = player:GetPosition()
    argu.angle              = player:GetAngle()
    argu.linear_velocity    = player:GetLinearVelocity() * 1.1
    argu.enabled            = true
    argu.tone1              = tone1
    argu.tone2              = tone2

  local cmd = SQL:Command("INSERT INTO vehicles (modelid,pos,angle,col1,col2,ownerid,health,price,storage,trap,guard,insurance,template,decal) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)")--local cmd = SQL:Command("INSERT INTO vehicles (modelid,pos,angle,col1,col2,ownerid,health,price,storage,trap,guard,insurance,template,ownername,decal) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")
        cmd:Bind( 1, argu.model_id )
cmd:Bind( 2, argu.position )
cmd:Bind( 3, argu.angle )
cmd:Bind( 4, argu.tone1)
cmd:Bind( 5, argu.tone2 )
cmd:Bind( 6, Player:GetSteamId().id)
cmd:Bind( 7, 1 ) -- was health
cmd:Bind( 8, 1000) -- price
cmd:Bind( 9, "|") -- was storage
cmd:Bind( 10, 0) --?  trap what are the off value
cmd:Bind( 11, 0) -- ? what are the off value guard
cmd:Bind( 12, 1) -- insurance
cmd:Bind( 13, argu.template )
--cmd:Bind( 14, Player:GetName())
cmd:Bind( 14, argu.decal )
  cmd:Execute()

    local v = Vehicle.Create( argu )
    self.vehicles[ player:GetId() ] = v

    v:SetUnoccupiedRespawnTime( nil )
v:SetDeathRemove(true)
    player:EnterVehicle( v, VehicleSeat.Driver )
    return true, ""
end

The problem appears when I try to test the script.It gives me errors that it can't write sql since its in a unaccepted format.
Also lists the PlayerFired function
and another line inside it

Code: [Select]
success, err = self:BuyVehicle( player, item, tone1, tone2 )I think that it tries to pass as arguments  the actual items of the menu itself and not the actual values that its supposed to have.

Any ideas would be greatly appreciated.
9
JC2-MP / Re: Survival District - Testserver
« Last post by MeTeC on July 26, 2019, 03:45:39 am »
Hello, I've had a very long conversation with the developer of this mod in 2014.
He banned me because he though I was a cheater.

https://www.jc-mp.com/forums/index.php/topic,4859.120.html

IGN if you are still here, 5 years later I still say to you that I WAS NOT A CHEATER and I played legit.

I had a hard time to accept this ban because it was so unfair to me.

I find it funny today but be careful next time when you ban someone ! It might be the 5% legit player like me that are innocent !

PS : I still have my ulgy face uploaded in this website lmao
10
Releases / [Release] Basic Anti-Cheat
« Last post by MrQWERTYU on July 10, 2019, 08:54:36 pm »
* At the moment, it protects only from invulnerable players.
Basic Anti-Cheat
Basic Anti-Cheat for your server.

WARNING: Anti-cheat will trigger on events ply.invulnerable and ply.makeinvulnerable, please read the information for server developers from below. Do not use this plugin if you don't know what to do.

Download:
- GitHub

For server developers:
Use this event to enable/disable Anti-Cheat:
Code: Lua
  1. Events:Fire( "AntiCheat", {acActive = true/false} )

Use this event to enable/disable Anti-Cheat Bullet hit check:
Code: Lua
  1. Events:Fire( "AntiCheat", {acBulletCheck = true/false} )

Use this event to enable/disable Anti-Cheat Explosion hit check:
Code: Lua
  1. Events:Fire( "AntiCheat", {acExplosionCheck = true/false} )

  • true - Enable
  • false - Disable

Example:
For example ProperPassive plugin...
Code: Lua
  1. function Passive:NetworkObjectValueChange(args)
  2.   if args.key == "Passive" and args.object.__type == "LocalPlayer" then
  3.     if args.value then
  4.       Game:FireEvent("ply.invulnerable")
  5.       Events:Fire( "AntiCheat", {acActive = false} )
  6.     else
  7.       Game:FireEvent("ply.vulnerable")
  8.       Events:Fire( "AntiCheat", {acActive = true} )
  9.     end
  10.   end
  11. end
Pages: [1] 2 3 ... 10