Ulysses Stuff > Suggestions

Fake an achievemnet

<< < (2/2)

justinboggs:
there fake... it makes it look like you got an achievement..... when you get a real achievement it posts your name in yellow and in white it saids earned the achievement and in yellow again it saids what the achievement you put in the !ach

justinboggs:
Also the command would have to be run silently all the time and never showed that it was being used even if run though chat

justinboggs:
anyone want to help with this???? and can someone point to me a page with ulx functions and i can try myself

JackYack13:

--- Code: ---local CATEGORY_NAME = "Utility"

function ulx.fakeachievement(ply, targets, achievement)
local affected_plys = {}
for _, v in pairs(targets) do // loop through all players passed in the command argument
ULib.tsayColor(nil, false, team.GetColor(v:Team()), v:Nick(), Color(255, 255, 255), " earned the achievement ", Color(255, 200, 0), achievement) // print the message to chat
end
end
local fakeachievement = ulx.command(CATEGORY_NAME, "ulx fakeachievement", ulx.fakeachievement, "!fakeachievement", true) // add the command
fakeachievement:addParam{ type = ULib.cmds.PlayersArg, ULib.cmds.ignoreCanTarget } // add players parameter
fakeachievement:addParam{ type = ULib.cmds.StringArg, hint = "name of achievement" } // add achievement name parameter
fakeachievement:defaultAccess(ULib.ACCESS_ADMIN) // set default access to admin-only
fakeachievement:help("Print a fake achievement message to chat.")

--- End code ---

I haven't tested the code but something like that should work. Just put that in a lua file under lua\ulx\modules\sh

Navigation

[0] Message Index

[*] Previous page

Go to full version