Admin Fun Commands V1.3 UPDATE

Author Topic: Admin Fun Commands V1.3 UPDATE  (Read 9982 times)


y'know something tells me this is gonna be abused as much on servers as FFC but i don't know.

Can I request some commands?
Like /REEEEEEEEEEEEEEEEEEEE
So you can screech in a crabwalk too.
Or /Bonez
And maybe have a real blockhead skeleton.

for some reason i keep crashing, only when this is enabled
weird :S
ye gonna need some logs
y'know something tells me this is gonna be abused as much on servers as FFC but i don't know.
its admin only so unless you are running a stuffty server it should be fine.


V1.2
  • Fixed Dunce command

munk's server pack revisited?

V1.3
  • Added ALL modifier to Dunce, Slay, Slap, and Crab Commands

V1.3
  • Added ALL modifier to Dunce, Slay, Slap, and Crab Commands


Oh yes.

blid based is pretty inconvenient though. probably better just to check if the input is all numbers and attempt a blid match first, then if that fails use findClientByName.
Code: [Select]
function serverCmdSlay(%client,%query) {
   if(!%client.isAdmin) return;
   // Try to find the requested client with the credentials in %query.
   if(!isObject(%queryObj = findClientByName(%query))) {
     if(!isObject(%queryObj = findClientByBL_ID(%query))) {
       // Couldn't find the requested client via Name / BL_ID.
       messageClient(%client,'',"\c6No one found by that name / BL_ID.");
       return;
    }
  }
  if(!isObject(%player = %queryObj.player)) return; // Checks if the queried client's player exists. If it doesnt, stop the function.
  // Kill the player.
  %player.kill();
}
Here's an example for you, OP. This will allow people to go by BL_ID and Name easily.
And then, if you want to kill me, type any of these in-game (provided i'm on the server of course):
/slay "Clay Hanson"
or
/slay Clay
or
/slay 15144

And because there may be multiple people on the server with 'Clay' in their name, you can always go by bl_id.
Always check name first, since some people could have a number-based name.
« Last Edit: March 22, 2017, 06:07:07 PM by RTBARCHIVE »