Recent Posts

Pages: [1] 2 3 ... 10
1
Developers Corner / Re: Auth overwrite?
« Last post by kaisar123 on Yesterday at 06:46:12 PM »
Thank you so much for this script. I have been looking for something like this for a long time and now I have it.
2
Developers Corner / Re: surrenderScript
« Last post by Timmy on June 22, 2017, 10:55:31 AM »
That script does work to some extent:

If I attack someone for 5 damage and my opponent has 1 HP remaining. -> Opponent does not take damage.
If I attack someone for 5 damage and my opponent has 2 HP remaining. -> Opponent dies because of damage.

Problem is that ply:Health() returns the player’s health before damage is taken.

Suggestion: check if the damage is lethal instead.

Tip #1: You can get damage info and suppress damage with the GM:EntityTakeDamage hook.

Tip #2: Example of how to use the hook to detect and suppress lethal damage:
Code: Lua
  1. hook.Add( "EntityTakeDamage", "SurrenderHook", function ( target, dmg )
  2.     if target:Health() <= dmg:GetDamage() then
  3.         -- TODO: Strip player
  4.         -- TODO: Apply slowness
  5.         ply:SetHealth( 1 )
  6.         return true -- Suppress lethal damage
  7.     end
  8. end )
3
Developers Corner / surrenderScript
« Last post by Suicidal Dog on June 22, 2017, 04:23:02 AM »
I am trying to make a script that will force a player to be stripped and slowed when their health is lower than 1, I want to also make it so when they are healed up they will then receive all their weapons back. I have some of it but it doesn't seem to identify the player is less than a certain health amount and stop them taking damage.

Code: Lua
  1.  
  2. local surrenderTeams = {
  3.         [TEAM_CADET]=true,
  4. }
  5.  
  6. hook.Add("PlayerShouldTakeDamage","SurrenderHook",function( ply, att )
  7.  
  8.         if surrenderTeams[ply:Team()] then
  9.  
  10.                 if ply:Health() <= 1 then
  11.  
  12.                         ply:SetHealth(1)
  13.                         ply:SetWalkSpeed(100)
  14.                         ply:SetRunSpeed(100)
  15.                         ply:SetCrouchedWalkSpeed(100)
  16.                         return false
  17.  
  18.                 end
  19.  
  20.         end
  21.  
  22. end)
4
Honestly, if they can't learn not to abuse powers, remove them.
Money should not guarantee pardon.

But, it is an educational answer.
 o ulx userdeny <player> <command> [<remove explicit allow or deny instead of outright denying: 0/1>] - Remove from a user's access.
 o ulx userdenyid <SteamID, IP, or UniqueID> <command> [<remove explicit allow or deny instead of outright denying: 0/1>] - Remove from a user's access.

From server console, you can use
Code: [Select]
ulx userdeny Tom "ulx kick"There's a way to do it in XGUI, but my apologies, I'm not taking the time to load it.

See also FAQ
https://forums.ulyssesmod.net/index.php/topic,3073.0.html
5
Hello, I have a quick question I'd like someone to answer it for me, please.

Let's pretend we have a donator called Tom. Donators have access to the kick command, but Tom has apparently been abusing it. But the other donators seem to be using the command in a fair way. With this being said, I'd like to know if Tom could have his kick permission revoked without losing the entire rank completely.

Is there a possibility to do this? I saw that there's something called "Restrict player(s)" so I tried entering Steam ID's and it didn't work.
6
Developers Corner / Re: Pointshop Points for taunting
« Last post by FTWPanda on June 21, 2017, 04:50:12 AM »
Oh okay i will try that, thank you for helping
7
Off-Topic / MOVED: Pointshop Points for taunting
« Last post by JamminR on June 20, 2017, 07:13:15 PM »
8
Developers Corner / Re: Pointshop Points for taunting
« Last post by MrPresident on June 20, 2017, 05:23:26 PM »
What I sent you was a hook. You need to set it up like a hook.

JamminR gave you an example.
9
Developers Corner / Re: Pointshop Points for taunting
« Last post by FTWPanda on June 20, 2017, 01:29:45 PM »
Okay, so ive tried implementing it like this:

         if pl:Team() == TEAM_HUNTERS then
            rand_taunt = table.Random(PHE.HUNTER_TAUNTS)
         else
            rand_taunt = table.Random(PHE.PROP_TAUNTS)
                                GM:PlayerStartTaunt(ply, length)
                                ply:PS_GivePoints(length)
                                ply:PS_Notify("You've been awarded " .. length .. " Points for taunting!")
         end

but that made it so the taunt via f3 stopped working. What am i doing wrong here? do i need to define the length for every possibilty or did i miss something?
10
Developers Corner / Re: Pointshop Points for taunting
« Last post by FTWPanda on June 20, 2017, 01:19:16 PM »
Oh i didnt realize that was to detect taunts, i will try to implement it^^

Thank you very much.
Pages: [1] 2 3 ... 10