General > Developers Corner

ulx.fancyLogAdmin

(1/1)

JasonMan:

--- Code: ---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." )
--- End code ---

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

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version