PointShop addon for TTT

-shnipe-

Thank you. Haha, you know its a good community if they have a free website. Sorry they ripped you off!

Looks good, thanks for releasing the code!

Just saying dude, nice work. I tested out the code you had however and got this error.

[ERROR] lua/autorun/sv_tttfunction.lua:10: function arguments expected near ‘==’

  1. unknown - lua/autorun/sv_tttfunction.lua:0

Also will this affect players if its in the roundover stage? (Deathmatch)

Depends if TTT clears roles at the post round phase, to be sure, you can check if the round is active

Isn’t there a hook for that?

Thank you for this! I’ve been waiting for something like this for a while now.

The only error I get is this:


[ERROR] lua/autorun/sv_tttkillpoints.lua:10: function arguments expected near '=='
  1. unknown - lua/autorun/sv_tttkillpoints.lua:0

Fixed the errors :slight_smile:

Sorry, I just had to remake this because yours does not work at all, no offence.
[lua]
–To be placed in lua/autorun/server/
local RolePoints = {
[ROLE_DETECTIVE] = {[ROLE_DETECTIVE] = -30,–Killed Detective as Detective
[ROLE_INNOCENT] = -10,–Killed Innocent as Detective
[ROLE_TRAITOR] = 20
},
[ROLE_INNOCENT] = {[ROLE_DETECTIVE] = -50,
[ROLE_INNOCENT] = -20,
[ROLE_TRAITOR] = 20
},
[ROLE_TRAITOR] = {[ROLE_DETECTIVE] = 50,
[ROLE_INNOCENT] = 25,
[ROLE_TRAITOR] = -30
}
}

function NotifyPlayer(ply, killer)
local num = RolePoints[killer:GetRole()][ply:GetRole()]
local bool = string.find(num, “-”)
ply:PrintMessage(HUD_PRINTTALK, “[TTT] Shop: You were killed by “…killer:Nick()…” they were “…killer:GetRoleString()…”.”)
if bool then
killer:PrintMessage(HUD_PRINTTALK, “[TTT] Shop: You had “…num…” points taken away for killing “…ply:Nick()…”, they were a(n) “…ply:GetRoleString()…”.”)
else
killer:PrintMessage(HUD_PRINTTALK, “[TTT] Shop: You were awarded “…num…” points for killing “…ply:Nick()…”, they were a(n) “…ply:GetRoleString()…”.”)
end
killer:PS_GivePoints(num)
end

function PointShopDeathHook(ply, killer, dmginfo)
if !IsValid(killer) and !killer:IsPlayer() and !IsValid(ply) and !ply:IsPlayer() then return end
if GetRoundState() == ROUND_ACTIVE then
NotifyPlayer(ply, killer)
end
end
hook.Add(“DoPlayerDeath”, “PointShopDeathHook”, PointShopDeathHook)
[/lua]

Jenkins you Scottish twat, bullshit we screwed you over, your the one who started banning everyone. No one liked you anyways and you call yourself a dev when you did shit on the server and you couldn’t even get this coding right.

Pay me then? :eng101:

Jenkins, if I must say, there is a few things I would like to address about you.

For first of all, we did not swipe this code off you, we don’t even use this code in the Pointshop, we use an entirely different one to this, I mean, if we would of used this one, it wouldn’t of worked, so good lie on that account Jenkins. You created this and according to everyone it doesn’t even work, how coincidental is that? I mean the first thing you did code for the server broke too.

Next of all, should I bring up why you were banned? Abusing your privileges given to you as developer. I always thought it was a bit suspicious that night when you asked for commands like traitor command, I guess I can see why, respawning yourself as T while no other admins where on the server, and when I joined after receiving the evidence from one of the fellow players, it wasn’t a surprise you left once I joined to have a word. When all of the admins questioned you? You couldn’t give two shits, you do this all the time with servers it seems, moving on one from the next, abusing powers and privileges given to you. Doing all of this, while no-one else was the server and thinking that no-one will know, its a good thing we have a good community which does report these events.

May I also bring up the forum too, since I know you have been bitching about that. And all I can say at the end of the day is, it does is job, something which you obviously cannot fucking do. If it works and works fine, no problems, what is bad about it? Its hard to say the same thing about your coding.

May I also bring up the fact you purposely tried to buy servers in hopes of being favoured by Ambient, you told him about buying all these servers and then began advertising them saying come join our new Minecraft server and asking people would you like DarkRP servers? It was like you were purposely trying to buy yourself into MTG, sticking your head up Ambient’s arse thinking he may like you if you bought all this shit, were you thinking you were going to get co-owner, and abuse your powers even more?

So, just listen to me guys, if he ever asks to code anything for your server, don’t let him. He is a lying, cheating and ultimately a idiot. (I mean looking at your profile you have been rated it 321 times). If you do, your just going to end up with a guy who abuses his commands and will end up lying in intent to give your server a bad reputation.

P.S. Oh look I still have your abuse evidence.http://imgur.com/a/6IkwV

If you guys decide to use my code, give me credit.

Can you guys stop waggling your one inchers for one second and get back on topic? This is about KILLER DETECTION CODING, not a pissing war amongst children…

Yes, the code had an error however- it was fixed. And i’d like to take a guess that it was probably untested.

Granted it wasn’t the most optimised coding in the world, but at LEAST he took the time to actually make it, unlike you guys that sit on your arse to pay people to make things for you.

-snip-

Can I just make this clear, we did not pay him to code the stuff, Ambient has coded most of the stuff on our server entirely on his own. He offered to code stuff for us, we did not pay him. Yes it is nice of him to offer this code, still makes him a complete cunt though in my opinion.

I second this. This guy can’t code for shit.

Even if it is your opinion I wouldn’t say that on Facepunch, bud. coughflamingcough

The code doesn’t seem to work for me, I named it point.lua, and put it in lua/autorun/server. Is there something I’m missing?
Sorry for bringing up such an old thread and asking a dumb question like this.