Welcome, Guest. Please login or register.
Did you miss your activation email?
November 10, 2024, 06:57:56 AM
Home Help Login Register
News: Zombie Master 2 discussion

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Garry's Mod TTT - Question.
Pages: [1]
Author Topic: Garry's Mod TTT - Question.  (Read 5398 times)
Robin
Poster

Posts: 54


« on: November 21, 2010, 07:20:42 PM »

Hi, I'd like to ask:

IS there any way to Edit someones karma (For Admins) If not that is a suggestion (Useful in RDM cases)


Maybe even a plugin for Evolve Mod Or Sourcemod etc.

Thanks,
Robin

Yo Yo Need Server Support? Your Host UKLame? PM Me and I shall "Help" you.
(FREE)
Manmax75
Poster

Posts: 254


Programming Guy


« Reply #1 on: November 21, 2010, 09:37:44 PM »

I have a karma editing piece of code, I could paste it, if you like.

Ride Forward and Thrust Your Pelvis In The Dark Void. The One Induced By Pleasure Yet Cast By The Bigger Picture.
Robin
Poster

Posts: 54


« Reply #2 on: November 22, 2010, 03:45:20 PM »

That would be great.

Yo Yo Need Server Support? Your Host UKLame? PM Me and I shall "Help" you.
(FREE)
Robin
Poster

Posts: 54


« Reply #3 on: November 22, 2010, 03:45:57 PM »

Is there any way to intergrate it into Evolve Mod?

Yo Yo Need Server Support? Your Host UKLame? PM Me and I shall "Help" you.
(FREE)
Manmax75
Poster

Posts: 254


Programming Guy


« Reply #4 on: November 22, 2010, 07:56:16 PM »

Quote
ChatCommands = {}

function AddChatCommand(cmd, callback)
for k,v in pairs(ChatCommands) do
if cmd == v.cmd then return end
end
table.insert(ChatCommands, {cmd = cmd, callback = callback})
end

function ChatCommandSay(ply, text)
for k, v in pairs(ChatCommands) do
if string.lower(v.cmd) == string.Explode(" ", string.lower(text))[1] then
return v.callback(ply, "" .. string.sub(text, string.len(v.cmd) + 2, string.len(text)))
end
end
end
hook.Add("PlayerSay", "ChatCommandSay", ChatCommandSay)

function SetKarma(ply, args)
args = string.Explode(" " ,args)
if args[1] != nil then
playerz = FindPlayer(args[1])
end
if playerz == nil then
  ply:PrintMessage(HUD_PRINTTALK, "User Not Found")
elseif args[2] == nil then
ply:PrintMessage(HUD_PRINTTALK, "No Amount Entered")
elseif tonumber(args[2]) > 1000 then
ply:PrintMessage(HUD_PRINTTALK, "Not Allowed To Be Set Over 1000")
elseif playerz != nil and args[2] != nil and tonumber(args[2]) <= 1000 then
if not ValidEntity(ply) or ply:IsSuperAdmin() or ply:IsAdmin() then
playerz:SetLiveKarma(args[2])
ply:PrintMessage(HUD_PRINTTALK, "You Have Changed A Users Karma")
playerz:PrintMessage(HUD_PRINTTALK, "Your Karma has been set to " .. args[2])
else
ply:PrintMessage(HUD_PRINTTALK, "Failed To Set Karma. Check That You Are Admin.")
end
end
end
AddChatCommand("!karma", SetKarma)


I have no experience with evolve, but I am sure someone can help you. Also, when you modify someone karma, you don't actually see it change until next round.

Ride Forward and Thrust Your Pelvis In The Dark Void. The One Induced By Pleasure Yet Cast By The Bigger Picture.
Redcow
Poster

Posts: 87


« Reply #5 on: November 23, 2010, 01:31:21 AM »

I have no experience with evolve, but I am sure someone can help you. Also, when you modify someone karma, you don't actually see it change until next round.


Where does that code go
Manmax75
Poster

Posts: 254


Programming Guy


« Reply #6 on: November 23, 2010, 06:01:35 AM »

My code? you put it server side in your own script or you can insert it into admin.lua within the gamemodes/terrortown director but I don't recommend that.

Ride Forward and Thrust Your Pelvis In The Dark Void. The One Induced By Pleasure Yet Cast By The Bigger Picture.
Robin
Poster

Posts: 54


« Reply #7 on: November 23, 2010, 03:56:44 PM »

kk Thanks

Yo Yo Need Server Support? Your Host UKLame? PM Me and I shall "Help" you.
(FREE)
Robin
Poster

Posts: 54


« Reply #8 on: June 01, 2011, 03:25:54 PM »

MAJOR BUMP


(Code Didnt Work)

Yo Yo Need Server Support? Your Host UKLame? PM Me and I shall "Help" you.
(FREE)
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #9 on: June 01, 2011, 04:18:37 PM »

MAJOR BUMP


(Code Didnt Work)

Maybe it doesn't work because the topic is so old if you post it's considered a "Major Bump"?
Robin
Poster

Posts: 54


« Reply #10 on: June 01, 2011, 05:29:53 PM »

Locking and Starting a New One

Yo Yo Need Server Support? Your Host UKLame? PM Me and I shall "Help" you.
(FREE)
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Garry's Mod TTT - Question. « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.01 seconds with 18 queries.