PlayerSpawn and PlayerDeath hooks
Every medal has an option to hook into PlayerSpawn and PlayerDeath. Below is an example of a medal with these hooks:
CH_Medals.Medals[ "medal_bitcoin" ] = {
Name = "Bitcoin King",
Icon = Material( "materials/craphead_scripts/ch_medals/medals/bitcoin.png", "noclamp smooth" ),
Description = "A special mark for players who have dedicated their life to mining bitcoins.",
Category = "DarkRP",
PlayerSpawn = function( ply )
end,
PlayerDeath = function( ply )
end,
}
As you can see the hooks here are empty, but you can fill in any code that you want and that code will then be ran when a player spawns or when a player dies.
Feel free to open a ticket if you want help with this and I'll help you if it's nothing complicated :)