• Welcome to Vice City Multiplayer.
 

Ban Error

Started by Tamas, August 03, 2008, 12:56:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tamas

My Ban Alias:

Quotealias vcmp.ban {
  vcmp.adminchat Admin:[ [ $vcmp.hgetname($1) ] ] Banned Player:[ [ $$vcmp.hgetname($vcmp.nameid($1)) ] ] $iif($2-, $2-,)
  !write vcmp.banned.txt Admin: $vcmp.hgetname($1) Banned: $vcmp.hgetname($vcmp.nameid($1)) IP: $vcmp.hgetip($vcmp.nameid($1)) $iif($2,$2-,)
  .timer. $+ $$vcmp.nameid($1) $+ .ban -m 1 250 vcmp.command ban $$vcmp.nameid($1)
}

Code:
Quoteelseif (($2 == ban) && ($vcmp.loggedin($1) > 4)) {
    if ($vcmp.nameid($3) == $null) vcmp.adminmsg $1 Error: Invalid ID.
    else {
      if ($hget(vcmp,loggedin. $+ $1) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3))) { vcmp.adminmsg $1 You can't ban someone higher level admin than you... | vcmp.kick $1 }
       else { vcmp.adminchat Kicking $vcmp.hgetname($vcmp.nameid($3)) | vcmp.ban $vcmp.nameid($3) $iif($4-,Reason:[ [ $4-,) ] ] }
    }
  }

The problem is when i type /c ban goldkinght it says:
<@BootRobocop> Admin:[ goldkinght ] Banned Player:[ goldkinght ] Reason:[ test ]

I want to change to this format:
<@BootRobocop> Admin:[ [SRS]Tomi ] Banned Player:[ goldkinght ] Reason:[ test ]
Dont know why its showing the banned person name in the  Admin: section.

TanaX01

use Admin:[ $vcmp.hgetname(%id) ]

Work 100%  ;)

Tamas

Its still not work  :(
Not showing the Admin name:

<@BootRobocop> Kicking [SRS]Tomi 
<@BootRobocop> Admin:[ ] Banned Player:[ [SRS]Tomi ] Reason:[ test ]

Code:

Quotealias vcmp.ban {
  vcmp.adminchat Admin:[ $vcmp.hgetname(%id) ] Banned Player:[ [ $$vcmp.hgetname($vcmp.nameid($1)) ] ] $iif($2-, $2-,)
  !write vcmp.banned.txt Admin: [ $nick ] Banned: $vcmp.hgetname($vcmp.nameid($1)) IP: $vcmp.hgetip($vcmp.nameid($1)) $iif($2,$2-,)
  .timer. $+ $$vcmp.nameid($1) $+ .ban -m 1 250 vcmp.command ban $$vcmp.nameid($1)