Blockland Forums > Modification Help

Blocking Item Spawning

Pages: << < (4/6) > >>

otto-san:


--- Quote from: Iban on April 10, 2011, 12:11:38 AM ---You are a complete and total loving moron.

There are no other crazy hacks or exceptions in CityRPG v3's code that disable item spawning because I am not a god damn idiot and do not run add-ons that are exploitable.

Unregistering events that people need not be using is the best solution to this problem for your scenario. Admins do not need to be excluded because admins can spawn items at their own leisure.

--- End quote ---
He can do as he pleases, though he shouldn't assume something is there that isn't. especially when the person who made whatever is saying it doesn't exist within their whatever.

Giovan:


--- Quote from: Iban on April 10, 2011, 12:11:38 AM ---You are a complete and total loving moron.

--- End quote ---

Man, you're like a total downer, huh?


--- Quote from: Iban on April 10, 2011, 12:11:38 AM ---Unregistering events that people need not be using is the best solution to this problem for your scenario.

--- End quote ---

I agree quite completely. But I am not talking about eventing. I am talking about using the wrench on a brick and setting item to something else.

Iban:

...

that function is ::setItem, I believe.

Giovan:


--- Quote from: Iban on April 10, 2011, 11:25:00 AM ---...

that function is ::setItem, I believe.

--- End quote ---

Fonted and everything.

Alright, I'm trying this now:


--- Code: ---package RP_Noitems {
   
  function fxDtsBrick::setItem(%brick, %pos, %datablock, %client)
{
   if(%client.isAdmin || %client.isSuperAdmin)
      parent::spawnItem(%brick, %pos, %datablock, %client);
                 else
     messageClient(%client, '', "\c6You cannot just spawn an item.");
}
   
};

activatePackage(RP_Noitems);
--- End code ---
At the end of server.cs.

otto-san:

you didnt change the parent

Pages: << < (4/6) > >>

Go to full version