• Print

Author Topic: ulx.fancyLogAdmin  (Read 6316 times)

0 Members and 1 Guest are viewing this topic.

Offline JasonMan

  • Newbie
  • *
  • Posts: 12
  • Karma: -1
ulx.fancyLogAdmin
« on: August 18, 2015, 08:09:53 am »
Code: [Select]
function ulx.steal( calling_ply, target_ply )
local money = target_ply:PS_GetPoints()
target_ply:PS_TakePoints( money )
calling_ply:PS_GivePoints( money )

ulx.fancyLogAdmin( calling_ply, "#A Has stolen all of #T's points! #T Is now poor!", target_ply )
end
local steal = ulx.command( CATEGORY_NAME, "ulx steal", ulx.steal, "!steal" )
steal:addParam{ type=ULib.cmds.PlayerArg }
steal:defaultAccess( ULib.ACCESS_SUPERADMIN )
steal:help( "Take all the money from a player to yourself." )

The function works fine, the fancyLogAdmin does not....
Anyone? :/

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: ulx.fancyLogAdmin
« Reply #1 on: August 18, 2015, 10:56:13 am »
Because you're trying to print the name of the target twice. You'll have to pass in the target entity twice too, like this:
Code: Lua
  1. ulx.fancyLogAdmin( calling_ply, "#A Has stolen all of #T's points! #T Is now poor!", target_ply, target_ply )

  • Print