Code:
alias p.i {
  var %table = PlayerInfo, %item = $+($1,:,$2), %data = $3-
  if ($isid) { return $hget(%table,%item) }
  if (%data) { hadd -m %table %item %data }
  else { hdel %table %item }
}
alias p.save { if ($hget(PlayerInfo).size) { hsave -bo PlayerInfo filename.dat } }
alias p.load { if (!$hget(PlayerInfo).size) { hmake PlayerInfo 1000 } | hload -b PlayerInfo filename.dat }

Usage: p.i playername itemname data data data
--Will save the data to that players item (like "p.i bob999 ip 12.34.56.78" will store that ip address)

Usage: $p.i(playername,itemname)
--Will return the data for that players item (like "$p.i(bob999,ip)" will return 12.34.56.78 using the above example)

Usage: p.i playername itemname (nothing else)
--Will delete that item from the player

You should have your script call on the p.load when mirc is first opened, and p.save when changes are made to keep the data current (in case of mirc crashing, etc, the data is already up to date).

See if that helps any.