View Single Post
  #5  
Old 12-21-2013, 11:30 PM
Tim_Rocks Tim_Rocks is offline
a true gentlemen
Tim_Rocks's Avatar
Join Date: Aug 2008
Location: USA
Posts: 1,863
Tim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to behold
My suggestion should work. Here, I will prove it to you.

I would add the putNPC2 in a weapon of some sort.
PHP Code:
function onPlayerChats() {
  if (
player.chat == ":dropitem") {
    
    
with (putNPC2(player.3player.1"join item;")) { //I would change this to your class.
      
this.owner player.account;
    }
  
    
player.chat "I dropped the item!";
  }

The class for the item will look like this, only you will be able to see it.
PHP Code:
function onCreated() {
  
this.attr[5] = this.owner;
  
  
this.setimg("block.png");
}

function 
onActionGrab() {
  if (
player.account != this.owner) {
    return; 
//Prevents other players from taking the item.
  
}
  
  
player.chat "Item added!";
  
  
//Item adding will go here.
  
  
this.destroy();
}

//#CLIENTSIDE
function onCreated() {
  if (
player.account != this.attr[5]) {
    
this.hide();
  } else {
    
this.show();
  }

Hopefully this was helpful.
__________________
Reply With Quote