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
October 16, 2019, 01:32:46 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.


Messages - TJGMan

Pages: [1] 2 3 4
1
Sorry everyone, but yes - I am no longer maintaining these scripts.  Real Life has thrown some things at me that are eating up my free time.

I am officially releasing my scripts into the public domain.  Anyone may modify them for public use, just don't go forgetting about little old me when you're rich and famous.

2
You seem to have some broken logic here.

Code: [Select]
if #result > 0 then
for row in pairs(result) do
local total = 0
local rowid = result[row].id
local reward = tonumber(result[row].bounty)
local cmd = SQL:Command("DELETE FROM playerBounties WHERE id=(?)" )
cmd:Bind( 1, rowid  )
cmd:Execute()
total = total+reward
end
Chat:Broadcast("[BOUNTY] "..killer:GetName().." has killed "..target:GetName().." for a total bounty of $"..total.."!", Color(255, 255, 0))
killer:SetMoney(killer:GetMoney()+total)
end


I think it needs to be this. You seem to be reseting the total value during each iteration of the loop in the one above.

Code: [Select]

if #result > 0 then
local total = 0
for row in pairs(result) do
local rowid = result[row].id
local reward = tonumber(result[row].bounty)
local cmd = SQL:Command("DELETE FROM playerBounties WHERE id=(?)" )
cmd:Bind( 1, rowid  )
cmd:Execute()
total = total+reward
end
Chat:Broadcast("[BOUNTY] "..killer:GetName().." has killed "..target:GetName().." for a total bounty of $"..total.."!", Color(255, 255, 0))
killer:SetMoney(killer:GetMoney()+total)
end


Ugh... you are correct.

I got pressed for time pre-holiday here in the states.  I'm correcting the GitHub code now.  Hope to be getting some more updates done soon.

3
Releases / Re: ZED V2.0 - The recode!
« on: December 24, 2013, 12:49:58 pm »
I'm very happy that you've made this more modular, I think this is what the community needs.  Great work here!

4
It would be great if you could combine old style chat adverts and new textdraw adverts in the same script


Great idea!  See original post for latest version  ;D

you can now use chat ads, render ads, or both with separate ads!

5
Links are backward, brother.

seem correct to me?  the non-ad.fly link is currently pointed to github directly?

6
Sorry no these are only on the console on the server.

i get a different error in game.

either the client script isn't receiving the string for the ad, or the number for the text size it's attempting to check against, or something in the config.lua is missing/incorrect.

have you tried using an unmodified version of the new ads.txt and config.lua?  In other words, a clean fresh install?

Also maybe try "unloadall" form the console and then "load TJG_Advertiser" to see if it works on its own.

7
No, if Jim sets a bounty on Dave, then Dave suicides and Dave gets paid because he's like "Dave killed Dave" and Jim loses the money.

Oh wow, ok, That's an easy fix... just give me like 2 minutes...

EDIT: I'm very sorry, I'm not sure if that's to do with the update or not but I was under the impression that the killer variable was nil on suicides.  I've added a check for that and have uploaded the latest cod eto GitHub.  Thanks for the report!


To go back and answer your other question, a GUI is coming...

8
Hey, what about adding a menu where people can see the current bounties and their rewards and administrators for which the bounties can't be set?

Also: When player with a bounty on his head suicides, the one who set up the bounty to that player receives the money back.

Serious bug: When the bounty set on "A" player by "B" player. If "A" player suicides he receives the money from "B" player, this makes easy to make money for "A" player if a bounty was set on his head.


whoa wait, what now?  So you're saying if Jim sets a bounty on Dave, and Dave suicides, Dave gets the bounty on himself?

9
Releases / Re: [RELEASE] Deathmatch 0.1 Beta
« on: December 22, 2013, 02:15:32 am »
Great idea!  I'll try and hop on to test!

10
hi TJG, yeah updated server and freeroam script.. i don't think it's your Script either.. tis rather anoying though as it was working before i updated the server. :( connect and have a look at me console.. you can see the errors there :) LANGEEKS TEST - Dorset, UK


you're seeing these on the client console?

11
well i've just downloaded the un edited version and it does the same. the freeroam-master error is only triggered when i load or reload TJG_Advertiser...

very strange.


That is indeed strange, but I do not believe it is directly related to my script.  Currently different scripts cannot talk to one another and are (I believe) in different namespaces.  Have you updated your server to the latest and used the updated freeroam script as well?  The newer freeroam script does not use the "Events:FireRegisteredEvent" anymore, which is the reason you're seeing that message.

12
Your script got a bug here , the notice in tchat are spamming like over 10 time : Received money : 400 .


Ugh... my bad... it's fixed now, re-download and install... Sorry!!!

13
Is there any possibility to use this as contact form? So if someone uses /contact textextextext it will send the message to some website i specify? It would be great to make a contact form for criticism or something else, also if possible with someway of making a captcha:) - http://www.jc-mp.com/forums/index.php/topic,3997.0.html

You can do anything you'd like with it really, but now that the new server is out with the option to include external LUA modules, this may be useless soon.

14
Thanks!  Just updated t version 1.1 - see original post for details!

15
Can you update this so people can set bounties without typing in the entire name of the person they want to set a bounty on?

Sure can - just uploaded new version in the original post!  Haven't fully tested it yet, but it should run just fine.

Pages: [1] 2 3 4