In MTA:mA go to Server > Options > Check 'Admin+'
Make sure you then enter the admin+ password too.
You need to be connected to the server with admin+ to do/receive certain things.
Also in that script you haven't ended the signal scope. (You need another } bracket)
on *:SIGNAL:mta.command:{
var %a = $iif($4 == $null,$2,$mta.getid($1,$4))
if ($3 == !hp) {
if (%a == -1) mta.msg $1 $2 Error: Invalid Name/ID.
elseif ($4 == $null) mta.msg $1 $2 Your Health is at $mta.health($1,$2) $+ %
else mta.msg $1 $2 $mta.name($1,%a) $+ s health is at $mta.health($1,%a) $+ %
}
}