Ulysses Stuff > Suggestions

Anti-suicide plugin

<< < (4/4)

Vakaris:
Ok people, forget it. I found the problem - Player Possesor Swep. It caught my eye while I was looking at my mods and when I looked into it's lua\autorun\server\servercontrol.lua I found that that's what was overriding my script. Once I took it out it works perfectly again, now all that's missing is the fix on UClip and my server is back to it's former glory!  ;D

Edit: Maybe if I took the following out of the PPS it would work ok?


--- Code: ---function FDoNotDieBitch(ply)
if table.HasValue(GlobalNoControlTable, ply:UserID()) then
return false
else
return true
end
end
hook.Add("CanPlayerSuicide", "FDoNotDieBitch",  FDoNotDieBitch)
--- End code ---

Just tested it out, works perfectly.

JamminR:
You can fix PPS for it's author.
I thought the Author knew better. Fptje?

A script using a hook, should "NEVER" return true in a hook IF that hook is meant to continue and do nothing.
returning true in a standard gamemode hook breaks all other like hooks.
That's why your script isn't working with that in PPS.

You could fix it in two possible ways.
Remove the word "true" in the else statement.
Or
Remove the 'else' and 'return true' from the function totally.

ALso, I see that FTpje released that mod almost 2 years ago.
He's no longer supporting it at Facepunch.
I hope he's learned since then that returning true in a standard hook is usually a bad thing.

atomicspark:

--- Quote ---Gamemode.CanPlayerSuicide
--- End quote ---

Aha!

JamminR:
Yes Atomicspark, that's what we've been talking about since first post.
:P
Due to some mod badly using the hook, Vakaris' stopped working.

When you asked about a Garry's mod gamemode function existing, I didn't catch thats what you were looking for, since we'd already been discussing it.

Vakaris:

--- Quote from: JamminR on September 26, 2009, 03:16:58 PM ---Yes Atomicspark, that's what we've been talking about since first post.
:P
Due to some mod badly using the hook, Vakaris' stopped working.

When you asked about a Garry's mod gamemode function existing, I didn't catch thats what you were looking for, since we'd already been discussing it.

--- End quote ---

I edited the mod by deleting the disallow suicide function from it. I was totally unecesary since in my server suicide is disabled by default.

I do beleave it's spelt " Vakaris's " not " Vakaris' ", since Vakaris is my name (Va-ka-ris the "s" is a part of my name) it does mean one person not multiple objects.

Navigation

[0] Message Index

[*] Previous page

Go to full version