• Print

Author Topic: Ulx fancylogadmin is appearing for opposite command.  (Read 4290 times)

0 Members and 1 Guest are viewing this topic.

Offline MelonShooter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Ulx fancylogadmin is appearing for opposite command.
« on: June 08, 2016, 08:16:26 pm »
So the title says my problem. Here's my code. Ask me if you need clarification.

Code: Lua
  1. function ulx.physgunban( calling_ply, target_plys, seconds, should_pardon )
  2.        
  3.         for i=1, #target_plys do
  4.                 if not should_pardon and ulx.getExclusive( target_plys[ i ], calling_ply ) then
  5.                         ULib.tsayError( calling_ply, ulx.getExclusive( target_plys[ i ], calling_ply ), true )
  6.                 else
  7.                         local v = target_plys[ i ]
  8.                         if not should_pardon then
  9.                                 v.physgunbanned = true
  10.                                 v:StripWeapon("weapon_physgun")
  11.                                 ulx.setExclusive ( v, "already banned from using a physgun." )
  12.                                 table.insert(playerphyslist, v)
  13.                                 timer.Create( "melonphysgunban" .. v:EntIndex(), seconds, 1, function ()
  14.                                         if v:HasWeapon( "weapon_physgun" ) then
  15.                                                 v.physgunbanned = nil
  16.                                                 ulx.clearExclusive ( v )
  17.                                                 table.remove(playerphyslist, table.KeyFromValue(playerphyslist, v) )
  18.                                         else
  19.                                                 v:Give("weapon_physgun")
  20.                                                 ulx.clearExclusive ( v )
  21.                                                 v.physgunbanned = nil
  22.                                
  23.                                
  24.                                         end
  25.                                 end )
  26.                         else
  27.                                 if v:HasWeapon( "weapon_physgun" ) then
  28.                                         v.physgunbanned = nil
  29.                                 else
  30.                                         v:Give ("weapon_physgun")
  31.                                         ulx.clearExclusive ( v )
  32.                                         v.physgunbanned = nil
  33.                                 end
  34.                         end
  35.                        
  36.                 end
  37.         end
  38.         if not should_pardon and ulx.getExclusive( target_plys[ i ], calling_ply) then
  39.                 ulx.fancyLogAdmin( calling_ply, "#A banned #T from using his/her physgun for #i seconds.", target_plys, seconds )
  40.         else
  41.                 ulx.fancyLogAdmin( calling_ply, "#A pardoned #T from his/her physgun ban.", affected_plys )
  42.         end
  43. end

Offline MelonShooter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Ulx fancylogadmin is appearing for opposite command.
« Reply #1 on: June 08, 2016, 08:19:48 pm »
Oh well. Shoot me because this problem is really obvious.

  • Print