Author Topic: Blocking Item Spawning  (Read 1719 times)

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.
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.
« Last Edit: April 10, 2011, 12:18:31 AM by otto-san »

You are a complete and total loving moron.

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

Unregistering events that people need not be using is the best solution to this problem for your scenario.

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.

...

that function is ::setItem, I believe.

...

that function is ::setItem, I believe.

Fonted and everything.

Alright, I'm trying this now:

Code: [Select]
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);
At the end of server.cs.

you didnt change the parent

Too many parameters. The parameters are:
fxDTSBrick::setItem(%this, %itemData, %client)


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

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

again, you need to change the parent.

I hate restricted events on city RPs.

I hate restricted events on city RPs.
I hate dumbasses spawning tank projectiles.

again, you need to change the parent.

How, exactly?
I'm sorry, I'm mostly new to this.

I hate dumbasses spawning tank projectiles.
So. Do. I.

package RP_Noitems {
  
  function fxDtsBrick::setItem(%this, %itemdata, %client)
   {
      if(%client.isAdmin || %client.isSuperAdmin)
         parent::setItem(%this, %itemdata, %client);
                 else
        messageClient(%client, '', "\c6You cannot just spawn an item.");
   }
  
};

activatePackage(RP_Noitems);

you simply needed to change that