I have this script for sword only areas. In the areas where this weapon is added, deaths will not count. Any idea why?
PHP Code:
function onCreated() join("weapon_functions");
//#CLIENTSIDE
function onCreated()
{
enableweapons();
client.swordOnly = true;
//s+a, ect disabled in -*System
player.ap += 50;
player.hearts = 6;
player.ap -= 50;
disablemap();
disablepause();
disableselectweapons();
disableselectitems();
}
//keep this here, hearts are resetting when player dies
function onPlayerDies()
{
player.ap += 50;
player.hearts = 6;
player.ap -= 50;
}
function onPlayerEnters()
{
player.ap += 50;
player.hearts = 6;
player.ap -= 50;
if (client.swordOnly)
{
disableweaponselect();
player.selectedweapon = findWeaponId( this );
}
else {
//Disabled; trying to fix the enablefeatures mess. I don't think removing this will break anything.
//enablefeatures(allfeatures);
enablemap();
enablepause();
enableweapons();
enableselectweapons();
enableselectitems();
destroy();
}
}