Jump to content

Question on a command I created


Guest shawnh31

Recommended Posts

I wrote two commands that provide useful information for myself and other admins. The first command !apm will notify all admins currently on the MTA server in a PM that a person is suspected of cheating. The second command !pid will PM a list of players and their ID's.

The strange thing is that you can use !apm for every player except for a Player with ID 0. Instead of using the player that is actually ID 0, the command will display the nickname of the person who intiated the command.

So if my ID is 5 and Fred_J is 0 and I use !apm 0 the message displays with my nickname instead of Fred_J. Here's the code for both !apm and !pid.

-----------!apm ---------------------

elseif ($3 == !apm) {

if ($gus.level($1,$2) >= 3) {

set %ch 0

while (%ch = 7) mta.pm $1 %ch $mta.nick($1,$2) suspects $mta.nick($1,%a) of cheating.

inc %ch

}

}

else mta.pm $1 $2 You must be at least level 7 to use this command.

}

----------------- !pid ---------------------------

elseif ($3 == !pid) {

if ($gus.level($1,$2) >= 7) {

set %pid 0

while (%pid 0) !.timer 1 1 mta.pm $1 $2 $mta.nick($1,%pid) = %pid

inc %pid

}

}

else mta.pm $1 $2 You must be at least level 7 to use this command.

}

------------------------------------------

I also went a step further and created commands to freeze or mute all players under a certain level in the game. More humor to those commands than usefullness, but just trying to imporve my skills. With those commands I had to use timers to slow down processing the commands.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...