function deathHook(murderer, victim) { clientMessage("Gained 5 exp!") player_exp = player_exp + 5; }
do:
function deathHook(murderer, victim) { clientMessage("Gained 5 exp!") player_exp = player_exp + 5; } function leaveGame() { ModPE.saveData(XPName,player_xp); }
Now when you leave the game it saves your XP.
Quote from minecrave79
How would it work? And would it be able to save for example, a variable, in my case player_exp which changes its value throughout the script. for example, lets say it would gain 5 when a mob is killed like so:
function deathHook(murderer, victim)
{
clientMessage("Gained 5 exp!")
player_exp = player_exp + 5;
}
Would it be able to save the amount that is gained? Because after gaining exp then restarting block launcher it resets to 0. Would it be able to fix that?
Sorry if i sounded confusing, any help would be much appreciated.
Hope this helps if it does press the button.
1
Hello i`m Iron Leprechaun the New developer of the HeroMod whitch is a continuation of ShabanModz Flash Mod
This mod Currently adds the Flash armor and the Reverse Flash armor! Of course the armors have effects and soon custom GUI and moves! Craft the "Particle Accelerator", place it and tap it and you will get the Flash armor. Craft the "Reverse Flash Call Stone" and tap on the ground with it to summon the Reverse Flash Boss! The Reverse Flash Boss drops Reverse Flash Armour.
Contacts:
Skype:Live:ethan7s
kik:legorainbowdash
Planed And Upcoming Features
The Hero Mod is a mod with eventually custom effects,GUI,Armour,and player models.
In the next Update(2.0)Captain America,Dr.Doom.Incredible Hulk,and Thor Will be added as well As Custom GUI for all the Hero`s.
Download
Mod: https://utk.io/mods/905569871/The-Flash-Mod-013x
Recipies