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

2 years ago

Advertisement
November 17, 2019, 12:40:22 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 - Glover

Pages: [1]
1
Scripting support / Problems with players falling through the map.
« on: December 17, 2013, 07:49:57 pm »
Hi all,

I'm having issues with players falling through the map. When they first log in it's fine but whenever they die and respawn they always fall through the map. Even when I raise the coords to give them a longer time to render the map the issue still occurs.

My code:

Code: [Select]
spawns = {
Vector3(-4925.187012, 234.002518, -1370.304443),
Vector3(-4934.499023, 240.000793, -1414.097168),
Vector3(-4927.741699, 245.999985, -1388.601440),
Vector3(-4899.338867, 245.999985, -1408.729858),
Vector3(-4872.474609, 251.999985, -1399.522461),
Vector3(-4896.214355, 290.019196, -1400.230347),
Vector3(-4892.854492, 318.106628, -1395.367188),
Vector3(-4903.533691, 318.109467, -1395.884888),
Vector3(-4900.793945, 318.106628, -1403.429810),
Vector3(-4898.647461, 319.722321, -1399.202637)
}

textColor = Color(115, 170, 220)
players = {}
 
StartGame = function()
for player in Server:GetPlayers() do
local randomIndex = math.random(1, #spawns)
local spawnPosition = spawns[randomIndex]
player:SetPosition(spawnPosition)
player:ClearInventory()
local weapon = Weapon(28)
player:GiveWeapon(2, weapon)
player:SetHealth(1)
end
end

PlayerSpawn = function(args)
StartGame()
local message = "Innovative Gaming - Deathmatch"
args.player:SendChatMessage(message, textColor)
return false
end


OnPlayerChat = function(args)
if args.text == "/kill" then
args.player:SetHealth(0)
return false
end
 
return true
end
 
 PlayerChat = function(args)
if args.text == "/pos" then
print(args.player:GetPosition())
return false
end
 
return true
end


Events:Subscribe("PlayerSpawn", PlayerSpawn)
Events:Subscribe("PlayerChat", PlayerChat)
Events:Subscribe("ModuleLoad", StartGame)
Events:Subscribe("PlayerChat", OnPlayerChat)

2
Hi,

I've heard a few people complain that when they try to follow this tutorial:
http://wiki.jc-mp.com/Lua/Tutorials/Beginner/Your_first_gamemode

They get errors or the script won't start.

Make sure you change all the

'Vector' to 'Vector 3'.

For example instead of:

Code: [Select]
spawns = {
Vector(14197.319336, 458.649567, 14382.654297),
Vector(14053.989258, 451.647766, 14313.827148),
Vector(14192.114258, 438.649567, 14359.311523),
Vector(14109.357422, 423.588654, 14350.410156),
Vector(14162.669922, 434.653503, 14290.238281)
}

Use

Code: [Select]
spawns = {
Vector3(14197.319336, 458.649567, 14382.654297),
Vector3(14053.989258, 451.647766, 14313.827148),
Vector3(14192.114258, 438.649567, 14359.311523),
Vector3(14109.357422, 423.588654, 14350.410156),
Vector3(14162.669922, 434.653503, 14290.238281)
}

3
Community Projects / Just Cause 2:MP Roleplay community.
« on: December 07, 2013, 04:00:41 pm »
If you're interested in creating or playing in a roleplay server feel free to join the group on steam I recently created. If it all goes well I'd be interested in hosting other games too!

http://steamcommunity.com/groups/JC2MPRoleplay/
london3.teamspeak.net:22635
http://www.innovativegaming.co.uk/

Twitter: @Inno_Gamin

4
JC2-MP / Lua Scripting.
« on: October 20, 2013, 11:25:25 am »
Hello,

I currently have no knowledge of Lua scripting but I'm very interested in learning prior to JC2:MP being released. I know MTA and GMod both use Lua, would it be a good idea to create game modes on these games to practice or will it be entirely different?

Pages: [1]