Ulysses Stuff > Suggestions
Fake an achievemnet
justinboggs:
I like evolves plugin that makes it look likes someone just got an achievemnet can someone make this for ulx
--- Code: ---/*-------------------------------------------------------------------------------------------------------------------------
Fake an achievement
-------------------------------------------------------------------------------------------------------------------------*/
local PLUGIN = {}
PLUGIN.Title = "Achievement"
PLUGIN.Description = "Fake someone earning an achievement."
PLUGIN.Author = "Overv"
PLUGIN.ChatCommand = "ach"
PLUGIN.Usage = "<player> <achievement>"
PLUGIN.Privileges = { "Achievement" }
function PLUGIN:Call( ply, args )
if ( ply:EV_HasPrivilege( "Achievement" ) ) then
local players = evolve:FindPlayer( args[1], nil, nil, true )
if ( players[1] ) then
local achievement = table.concat( args, " ", 2 )
if ( #achievement > 0 ) then
for _, pl in ipairs( players ) do
evolve:Notify( team.GetColor( pl:Team() ), pl:Nick(), color_white, " earned the achievement ", Color( 255, 201, 0, 255 ), achievement )
end
else
evolve:Notify( ply, evolve.colors.red, "No achievement specified." )
end
else
evolve:Notify( ply, evolve.colors.red, evolve.constants.noplayersnoimmunity )
end
else
evolve:Notify( ply, evolve.colors.red, evolve.constants.notallowed )
end
end
evolve:RegisterPlugin( PLUGIN )
--- End code ---
MrPresident:
--- Code: ---evolve:Notify( team.GetColor( pl:Team() ), pl:Nick(), color_white, " earned the achievement ", Color( 255, 201, 0, 255 ), achievement )
--- End code ---
Notify looks to be an internal function of Evolve. What does this look like or do? Porting this over to ULib would be very easy, but the only problem is it looks like it's making use of some other internal Evolve code.
Megiddo:
--- Quote from: MrPresident on February 25, 2012, 12:01:53 AM ---
--- Code: ---evolve:Notify( team.GetColor( pl:Team() ), pl:Nick(), color_white, " earned the achievement ", Color( 255, 201, 0, 255 ), achievement )
--- End code ---
Notify looks to be an internal function of Evolve. What does this look like or do? Porting this over to ULib would be very easy, but the only problem is it looks like it's making use of some other internal Evolve code.
--- End quote ---
Looks like that function is the equivalent of ULib.tsayColor.
justinboggs:
it shows a message to everyone just like it does when they learn a real achievement same colors and everything
MrPresident:
Are these the gmod internal achievements or some other achievements that Evolve has added? I wasn't aware that the game notified players when someone got an achievement.
Navigation
[0] Message Index
[#] Next page
Go to full version