I'm trying to make a skill system for my Hexer Mod v2.
I added,
Code:
self.auxlvl = 0;
self thread zhex\mp\_AuxSkills::aux();
into onplayerConnect();
and
Code:
level.subMenuNames[2][1] = "[1]Warmth [500]";
level.subMenuFunctions[2][1] = :: buyWarmth;
into Nukem's menu
This code should make player's auxlvl 10 if it was 0,
Code:
buyWarmth()
{
self freezeControls(false);
self thread exitMenu();
self notify ( "exitMenu" );
self VisionSetNakedForPlayer( getDvar("mapname"), .1 );
if ((self.TotalExperiencePoints >= 500) && (self.auxlvl == 0))
{
self.auxlvl = 10;
self.SkillsBoughtCost += 500;
}
else
{
notifyData = spawnstruct();
notifyData.titleText = "Not enough experience points";
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
}
}
And this code should do something if players auxlvl is 10,
Code:
aux()
{
if(self.auxlvl == 10){
self thread .......;
}
}
But it's not working. I'm new to coding please tell me what am I doing wrong.