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
August 23, 2019, 03:11:00 pm

Author Topic: Manhunt Game Mode  (Read 9940 times)

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: Manhunt Game Mode
« Reply #15 on: February 01, 2014, 03:17:22 pm »
roger that :D I am already working on it :D do you know a way to remove the 1vsall thing? right now i am working on that, but i'm not sure if everyone can kill everyone and that sort of things
you're amazing! can't wait to try it!

Alright I have a nice start, but somehow I cant spawn back to the normal world after i die! Can someone help me with that because I tried alot of ways to do that already and it simply wont work! Maroy, I will send you a friendrequest on steam so you can help me on some issues if that's okay to you.
« Last Edit: February 01, 2014, 06:21:30 pm by misterff1 »

Philpax

  • Developer
  • Hero Member
  • *****
  • Posts: 563
    • View Profile
Re: Manhunt Game Mode
« Reply #16 on: February 02, 2014, 02:42:54 pm »
Hi,

I noticed that Manhunt is a Derby derivative and therefore should include the original license notice in the repo and download (https://github.com/jc2mp/derby/blob/master/LICENSE) - can you please add this? It's important to establish attribution for scripts.

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: Manhunt Game Mode
« Reply #17 on: February 02, 2014, 05:52:13 pm »
Hi,

I noticed that Manhunt is a Derby derivative and therefore should include the original license notice in the repo and download (https://github.com/jc2mp/derby/blob/master/LICENSE) - can you please add this? It's important to establish attribution for scripts.

Yep, you're right. I will add it to HungerGames aswell since that one is based on Manhunt and therefore based on Derby

brandobras

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Manhunt Game Mode
« Reply #18 on: February 02, 2014, 07:22:31 pm »
Hi,

I noticed that Manhunt is a Derby derivative and therefore should include the original license notice in the repo and download (https://github.com/jc2mp/derby/blob/master/LICENSE) - can you please add this? It's important to establish attribution for scripts.

Yep, you're right. I will add it to HungerGames aswell since that one is based on Manhunt and therefore based on Derby
let me know when it's ready

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: Manhunt Game Mode
« Reply #19 on: February 02, 2014, 08:49:59 pm »
Hi,

I noticed that Manhunt is a Derby derivative and therefore should include the original license notice in the repo and download (https://github.com/jc2mp/derby/blob/master/LICENSE) - can you please add this? It's important to establish attribution for scripts.

Yep, you're right. I will add it to HungerGames aswell since that one is based on Manhunt and therefore based on Derby
let me know when it's ready

I will, but I first need a proper way of exiting the gamemode. I have tried lots of things and nothing works properly so far.

Please someone take a look at this script and help me

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: Manhunt Game Mode
« Reply #20 on: February 08, 2014, 10:15:53 pm »
okay to make it more clear:

GUYS WITHOUT HELP ON EXITING THIS MODE AFTER YOU DIE, I CANNOT MAKE HUNGERGAMES WORK PROPERLY!!!

Maroy, again, i have sent you a steam invite, so please accept so i can ask you stuff about this mode.
Please anyone who want hungergames and knows lua, please have a look at this script. I have tried so many things this last week. SonicXVe tried, Jman100 tried, Ahrotahntee tried, Patawic tried, FabioGNR tried and no one including me found the solution yet.

Please help.

PsYcHoKiLLa

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Manhunt Game Mode
« Reply #21 on: February 08, 2014, 10:47:41 pm »
You should rename it to Hunger Games mode :)

Ahrotahntee

  • JC2-MP Betatester
  • Jr. Member
  • *****
  • Posts: 63
    • View Profile
Re: Manhunt Game Mode
« Reply #22 on: February 26, 2014, 08:01:47 pm »
Ahrotahntee tried

I don't remember that, how drunk was I?

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: Manhunt Game Mode
« Reply #23 on: February 26, 2014, 08:45:41 pm »
Ahrotahntee tried

I don't remember that, how drunk was I?

Very drunk and late for a meeting :)
But it doesn't matter anymore, it is fixed now

BasPeter

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Manhunt Game Mode
« Reply #24 on: April 03, 2014, 07:23:53 pm »
i tried this script, and it is awesome!
but the chat system does not work somehow.
when i chat something i just see my own text twice with the others name.
and i cannot read the things other people say.

is it possible to fix this?
 

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Manhunt Game Mode
« Reply #25 on: April 05, 2014, 06:15:23 pm »
when i chat something i just see my own text twice with the others name.
and i cannot read the things other people say.
Same happens for me.

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: Manhunt Game Mode
« Reply #26 on: April 05, 2014, 10:50:32 pm »
It is because of the

for k,v in players do
chat:send

thing. It sends from all the players in the gamemode which actually should be sent from one and RECEIVED by others in the gamemode. Not really an idea how to fix it,but at least you know the problem now

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: Manhunt Game Mode
« Reply #27 on: April 06, 2014, 01:28:49 am »
It is because of the

for k,v in players do
chat:send

thing. It sends from all the players in the gamemode which actually should be sent from one and RECEIVED by others in the gamemode. Not really an idea how to fix it,but at least you know the problem now
Post the function or cite the line.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Manhunt Game Mode
« Reply #28 on: April 06, 2014, 06:39:10 am »
server/manhunt.lua line 259
Code: [Select]
    if ( msg:sub(1, 1) ~= "/" ) then
        if self:IsInManhunt(player) then
            for k,v in pairs(self.players) do
                player:SendChatMessage( "[Manhunt] "..v.player:GetName()..": " .. msg, v.player:GetColor() )
            end
        else
            return true
        end
    end 
is this what is causing the problem?

should maybe be:
Code: [Select]
    if ( msg:sub(1, 1) ~= "/" ) then
        if self:IsInManhunt(player) then
            for k,v in pairs(self.players) do
                if v ~=  player then
                player:SendChatMessage( "[Manhunt] "..v.player:GetName()..": " .. msg, v.player:GetColor() )
                end
            end
        else
            return true
        end
    end 
Will test this when i get a chance.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: Manhunt Game Mode
« Reply #29 on: April 06, 2014, 08:47:59 am »
Ahh, that explains it.
This:
Code: [Select]
    if ( msg:sub(1, 1) ~= "/" ) then
        if self:IsInManhunt(player) then
            for k,v in pairs(self.players) do
                if v.player ~=  player then
                player:SendChatMessage( "[Manhunt] "..v.player:GetName()..": " .. msg, v.player:GetColor() )
                end
            end
        else
            return true
        end
    end 
or this:
Code: [Select]
    if ( msg:sub(1, 1) ~= "/" ) then
        if self:IsInManhunt(player) then
            for k,v in pairs(self.players) do
                player:SendChatMessage( "[Manhunt] "..v.player:GetName()..": " .. msg, v.player:GetColor() )
            end
            return false
        else
            return true
        end
    end 
Should work.

Basically the problem is the player is sending a chat message, which they see, and then the server is sending their chat message to every player in the hunt, including them. Returning false in this function should prevent their message from being sent to them. Comparing the v.player object to the player object should also work, but by blocking the looping message instead of their original message.

Either one should do. Let me know.

EDIT: Misterff, did you ever fix that exit on death problem? If not send me a message with your server code.
« Last Edit: April 06, 2014, 08:53:21 am by JasonMRC »