Author Topic: Weapons spawns?  (Read 1476 times)

Is there a way to make it so only admins can make weapon spawns?

one could make a mod to do this

I would actually use this, Needs a /toggleadminwep to turn on and off.

People just sit and shoot at you when you are trying to build it is annoying. This mod would pwn noobs.

Not to mention the random vehicle and weapons spawns lying around your build area... >_< That stuff REALLY MAKES ME MAD!!!

possibly a mod where non-admins cant use any spawn (weps,vehicles,special tools,ect.)  unless allowed

In theory, you could use Aloshi's Dewrencher code, and just mod that so that it works off a whitelist, and auto-whitelist's admins.

This would solve the problem pretty well, but Badspot may find mildly abusive...

Gimme two seconds and I'll make.

EDIT:

Code: [Select]
package AdminOnlySpawns{
function FxDTSBrick::setItem(%brick, %item){
%client = %brick.client;
if(!$AdminSpawns){
parent::setItem(%brick, %item);
} else {
if(%client.isAdmin || %client.isSuperAdmin){
parent::SetItem(%brick, %item);
} else {
messageclient(%client,"","\c6Only admins can spawn items");
}
}
}
};
activatepackage(AdminOnlySpawns);

function serverCmdAdminSpawns(%client){
if(%client.isAdmin || %client.isSuperAdmin){
if($AdminSpawns){
$AdminSpawns = 0;
messageall("","\c6Item spawns have been switched \c0ON");
} else {
$AdminSpawns = 1;
messageall("","\c6Item spawns have been switched \c0OFF");
}
}
}

Type /adminSpawns to switch it on add off, it uses the brick's client so if the owner of the brick is admin they might be able to spawn items.
« Last Edit: September 20, 2007, 11:36:01 AM by MrPickel »



Won't work if the bricks are loaded from a save or if someone else tries to edit your bricks.

You could try checking every client's .wrenchbrick but that would error up if two people wrench a brick and the second sets an item. (.wrenchbrick isn't erased...)

Won't work if the bricks are loaded from a save or if someone else tries to edit your bricks.

That's what I said, but then you wont be giving trust to people who just randomly spawn stuff everywhere.

What I would do is make a mandatory minigame (no restrictions accept no wrench ((and/or no building))) and then the admins could leave and make the things they need. Now if only the host could leave that mini game. :( Can you? I haven't tried.