Multi Theft Auto mIRC Admin
MTA:mA allows to script your own scripts. But you must be already an expert in mIRC scripting.
These Identifiers, Commands and Events are for MTA:mA v4.0 and higher.
Text colored in gold are required server options.

Identifiers

$mta.active
Returns the server ID that is currently focused.

$mta.dir
Returns the directory of the script "mta.mrc".

$mta.dead(Server,PlayerID)
Returns $true or $false if a player is dead.

$mta.deaths(Server,PlayerID)
Returns the number of times a player has died since you got connected.

$mta.frozen(Server,PlayerID)
Returns $true or $false if a player is frozen.

$mta.getid(Server,Wildcard)
Returns the first PlayerID that matches the wildcard name.

Example:
$mta.getid(1,e) returns the 1st PlayerID of a name that contains a "e".
$mta.getid(1,ero) returns the PlayerID of "Aeron" (If no other names before "Aeron" contains "ero").

If no PlayerID is found, it returns $null.

$mta.idle(Server,PlayerID)
Returns the number of $ticks that the player hasn't said anything.

$mta.ip(Server,PlayerID)
Returns the IP of the player.

$mta.level(Server,PlayerID)
Returns the Level of the player.

$mta.muted(Server,PlayerID)
Returns $true or $false if a player is muted.

$mta.nick(Server,PlayerID,[N])
Returns the nickname of the player.

Example:
$mta.nick(3,6) returns the current nickname of PlayerID 6 on server 3.
$mta.nick(3,6,0) returns the total nicknames of PlayerID 6 on server 3.
$mta.nick(3,6,7) returns the 7th nickname of PlayerID 6 on server 3.

$mta.race(Server,[N])
Returns the Nth race name played on the server.

Example:
$mta.race(1) returns the current name of the race played on server 1.
$mta.race(1,0) returns the number of played races since you got conencted on server 1.
$mta.race(1,5) returns the name of the 5th played race on server 1 when you got connected.

$mta.races(Server,[N/Wildcard])
Returns the name or ID of the race of a server.

Example:
$mta.races(5) returns the total number of races availible on server 5.
$mta.races(5,67) returns the name of race ID 67 on server 5
$mta.races(5,3*re*k) returns the first race ID of the name on server 5 that matches the wildcard.

$mta.server(Server)
Returns the IP and port of the server.

Properties: ip, port, password, nick, cport, name, version, max, cmax, players

$mta.server(Server) returns ip and port in format "ip:port"
$mta.server(Server).ip returns the ip
$mta.server(Server).port returns the admin port
$mta.server(Server).password returns the admin password
$mta.server(Server).nick returns the admin nick
$mta.server(Server).cport returns the client port
$mta.server(Server).name returns the server name
$mta.server(Server).version returns the server version
$mta.server(Server).max returns the top maximum players
$mta.server(Server).cmax returns the client defined maximum players
$mta.server(Server).players returns the number of players on the server

$mta.time(Server,PlayerID)
Returns the number of $ticks a player has raced.

Commands

/mta
This start ups MTA:mA

/mta.addban <Server> <IP> [<Reason>]
This bans IP from the server.

/mta.ban <Server> <PlayerID> [<Reason>]
This bans the player from the server.

/mta.connect <Server>
This connects you to the server.

/mta.disconnect <Server> [<Reason>]
This disconnects you from the server.

/mta.echo <Server> <Text>
This echo's and (if enabled) logs the text into MTA:mA.

/mta.freeze <Server> <PlayerID>
This freezes the player on the server.

/mta.kick <Server> <PlayerID>
This kicks the player from the server.

/mta.map <Server> <Map name>
Searches, downloads and converts the map to MTA:mA format if found on the Communitie center.

/mta.mute <Server> <PlayerID>
This mutes the player on the server.

/mta.quit <Server>
This closes MTA:mA and disconnects you from all connected servers.

/mta.raw <Server> <Data>
This send raw data from $mta.dex to the server.

/mta.send <Server> <Data>
This send raw data from $mta.dex with flood control.

/mta.setpassword <Server> [<Password>] (Server password)
This removes or sets the server password for clients on the server.

/mta.setmaxplayers <Server> <Maximum players>
This sets the client defined maximum players.

Note: This can not be bigger then the top maximum.

/mta.shutdown <Server> (Server shutdown)
This shutdowns the server.

/mta.startrace <Server> <RaceID>
This start race with RaceID on the server.

/mta.text <Server> <Text>
This sends the text to the server.

/mta.unban <Server> <IP>
This unbans IP from the server.

/mta.unfreeze <Server> <PlayerID>
This unfreezes the player on the server.

/mta.unmute <Server> <PlayerID>
This unmutes the player on the server.

/mta.update
This checks for updatess of MTA:mA.

Events

on *:SIGNAL:mta.action:command
This event is triggerd when a players says something in action.
Parameters: $1 = Server, $2 = PlayerID, $3- = Action

on *:SIGNAL:mta.adcon:command
This event is triggerd when a admin or console says something.
Parameters: $1 = Server, $2 = PlayerID, $3- = Text

on *:SIGNAL:mta.addban:command
This event is triggerd when a admin bans a IP.
Parameters: $1 = Server, $2 = 0/1 (failed/success), $3 = IP

on *:SIGNAL:mta.command:command
This event is triggerd when a player does a !-command.
Parameters: $1 = Server, $2 = PlayerID, $3 = Command, $4- = Parameters

on *:SIGNAL:mta.connect:command
This event is triggerd after you connect with a server.
Parameters: $1 = Server

on *:SIGNAL:mta.death:command
This event is triggerd when a player dies.
Parameters: $1 = Server, $2 = PlayerID

on *:SIGNAL:mta.disconnect:command
This event is triggerd after you disconnect with a server.
Parameters: $1 = Server, $2- = 0/1/2/3/4/5/6/7 (User/Incorrect password/Already connected/Timed-out/To much connections/Banned/Name in use/Invalid Version)

on *:SIGNAL:mta.endrace:command
This event is triggerd when the only one player is still alive.
Parameters: $1 = Server, $2 = RaceID, $3 = PlayerID

on *:SIGNAL:mta.freeze:command
This event is triggerd when you freeze a player.
Parameters: $1 = Server, $2 = PlayerID, $3 = TriggerID, $4 = 0/1 (failed/success)

on *:SIGNAL:mta.join:command
This event is triggerd when a player joined.
Parameters: $1 = Server, $2 = PlayerID

on *:SIGNAL:mta.login:command
This event is triggerd when a player logs in.
Parameters: $1 = Server, $2 = PlayerID, $3 = Level, $4 = 0/1/2 (success/failed/already logged in)

on *:SIGNAL:mta.mute:command
This event is triggerd when you mute a player.
Parameters: $1 = Server, $2 = PlayerID, $3 = TriggerID, $4 = 0/1 (failed/success)

on *:SIGNAL:mta.nick:command
This event is triggerd when player changes his nick.
Parameters: $1 = Server, $2 = PlayerID

on *:SIGNAL:mta.part:command
This event is triggerd when a player leaves.
Parameters: $1 = Server, $2 = PlayerID, $3 = 0/1/2/3 (parted/kicked/banned/timed-out)

on *:SIGNAL:mta.pm:command
This event is triggerd when a player PM's another player.
Parameters: $1 = Server, $2 = PlayerID, $3 = ToID, $4- = Text

on *:SIGNAL:mta.quit:command
This event is triggerd when quit MTA:mA.
Parameters: None

on *:SIGNAL:mta.startrace:command
This event is triggerd when a race starts.
Parameters: $1 = Server, $2 = RaceID, $3 = 0/1/2 (success,failed,no players)

on *:SIGNAL:mta.racelist:command
This event is triggerd when the racelist is updated.
Parameters: $1 = Server

on *:SIGNAL:mta.setpassword:command (Server password)
This event is triggerd when password is set.
Parameters: $1 = Server, $2 = 0/N (failed,set to N)

on *:SIGNAL:mta.shutdown:command (Server shutdown)
This event is triggerd when the server shuts down.
Parameters: $1 = Server, $2 = 0/1/2 (success/waiting/disabled)

on *:SIGNAL:mta.start:command
This event is triggerd when you start MTA:mA.
Parameters: None

on *:SIGNAL:mta.text:command
This event is triggerd when a player says something.
Parameters: $1 = Server, $2 = PlayerID, $3- = Text

Note: !-commands are triggerd in on *:SIGNAL:mta.command:command.

on *:SIGNAL:mta.unban:command
This event is triggerd when you unban a IP.
Parameters: $1 = Server, $2 = 0/1 (failed/success), $3 = IP

on *:SIGNAL:mta.unfreeze:command
This event is triggerd when you unfreeze a player.
Parameters: $1 = Server, $2 = PlayerID, $3 = 0/1 (failed/success)

on *:SIGNAL:mta.unmute:command
This event is triggerd when you unmute a player.
Parameters: $1 = Server, $2 = PlayerID, $3 = 0/1 (failed/success)

Tools

$mta.dex(Data)
Returns a array of numbers that represents the data.

$mta.didexist(Dialog,ID)
Returns $true if dialog element ID exists.