function useItem(x,y,z,itemId,blockId,side)
{
if(blockId==57)
{
if(money>10||money==10)
{
addItemInventory(272, 1);
money=money-10;
}
else if(blockId==41)//this part and below won't work
{
if(money>20||money==20)
{
money=money-20;
addItemInventory(268, 1);
}
}
}
}
Can't get the second half of script to work it load but when I tap gold block nothing happens
Rollback Post to RevisionRollBack
Remember this is round 27, think off call or duty logic, our pistol are as useless as broken condoms.
function useItem(x,y,z,itemId,blockId,side)
{
if(blockId==57)
{
if(money>10||money==10)
{
addItemInventory(272, 1);
money=money-10;
}
else if(blockId==41)//this part and below won't work
{
if(money>20||money==20)
{
money=money-20;
addItemInventory(268, 1);
}
}
}
}
Can't get the second half of script to work it load but when I tap gold block nothing happens
Nearly correct but here is the fixed version:
var money=0;
function attackHook(attacker, victim)
{
if(getCarriedItem()==272||getCarriedItem()==268|| getCarriedItem()==267|| getCarriedItem()==276||getCarriedItem()==283)
{
money=money+10;
clientMessage("+10$");
}
}
function useItem(x,y,z,itemId,blockId,side)
{
if(blockId==57)
{
if(money>10||money==10)
{
addItemInventory(272, 1);
money=money-10;
}
}//changed from nothing
if(blockId==41)//this part and below won't work//changed from else if
{
if(money>20||money==20)
{
money=money-20;
addItemInventory(268, 1);
}
}
}
//Changed from } to nothing
function attackHook(attacker, victim)
{
if(getCarriedItem()==272||getCarriedItem()==268|| getCarriedItem()==267|| getCarriedItem()==276||getCarriedItem()==283)
{
money=money+10;
clientMessage("+10$");
}
}
function useItem(x,y,z,itemId,blockId,side)
{
if(blockId==57)
{
if(money>10||money==10)
{
addItemInventory(272, 1);
money=money-10;
}
else if(blockId==41)//this part and below won't work
{
if(money>20||money==20)
{
money=money-20;
addItemInventory(268, 1);
}
}
}
}
Can't get the second half of script to work it load but when I tap gold block nothing happens
Nearly correct but here is the fixed version:
var money=0; function attackHook(attacker, victim) { if(getCarriedItem()==272||getCarriedItem()==268|| getCarriedItem()==267|| getCarriedItem()==276||getCarriedItem()==283) { money=money+10; clientMessage("+10$"); } } function useItem(x,y,z,itemId,blockId,side) { if(blockId==57) { if(money>10||money==10) { addItemInventory(272, 1); money=money-10; } }//changed from nothing if(blockId==41)//this part and below won't work//changed from else if { if(money>20||money==20) { money=money-20; addItemInventory(268, 1); } } } //Changed from } to nothingLead developer of Dragonet!
Check out my game, Adventuria!
Dev of (IMO the best server ever) TwilightGamez!