🟡Step 3 - Let's setup the potions
Last updated
Last updated
In this step, you'll be setting up the FixPJ trigger event and the properties of different types of potions that players can use within your game.
Let's break down the setup:
To add your FixPJ trigger event to the script, first open the file resources/[ks_myspells]/ks-magic/custom/client.lua
Then, locate the line 19 or search for the function 'Custom:RestorePlayerModel(cb)'
An here you do two things:
Add your FixPJ trigger event
Change the cb(false)
to cb(true)
To configure the potions, first locate the file resources/[ks_myspells]/ks-magic/config.lua
and open it
Then search for the 'Config.Potions' table and edit the "value", "time" and "animals" according to your needs:
Here is what the variables do:
Healing potion - 'value' : How many health points can the player be healed
Shield potion - 'value' : How many shield points can the player be armored up
Animals potion - 'time' : How much time the player will be come animal
Animals potion - 'animals' : List of creatures that the player can transform randomly (Visit https://docs.fivem.net/docs/game-references/ped-models/#animals for the full list of animals)
Invisibility potion - 'time' : How much time the player can be invisible
Speed potion - 'time' : How much time the player will sprint faster
And remember to save the files! :3