• Welcome to Vice City Multiplayer.
 

Commands !Ban

Started by TanaX01, June 20, 2008, 01:43:24 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

TanaX01

Hai  :D

pls help with !ban command on IRC whe i type it,it doesnt work  :-\

In Irc :

!ban TanaX01 evacion

admin tanax banned reason evacion
-------------------------------------------------------------
In-Game

!ban Id Evacion

** Admin:[ TanaX01 ] Banned:[ TanaX01 ] Reason:[ evacion ]
-------------------------------------------------------------


Why Not In Irc

!ban user evacion

user banned in game

** Admin:[ TanaX01 ] Banned:[ User ] Reason:[ evacion ] ???
-------------------------------------------------------------

Irc:
Quoteelseif ($1 == !ban) vcmp.ban $vcmp.nameid($2) $3-

In-Game:

Quoteelseif ($2 == !ban) {
      if ($hget(vcmp,loggedin. $+ %id) < 3) { vcmp.adminmsg %id You Must Be Admin Level 2 Or Higher To Attempt This Command. }
      else {
        if ($vcmp.nameid($3) == $null) vcmp.adminmsg %id Error: Invalid ID.
        else {
          if ($hget(vcmp,loggedin. $+ %id) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3))) { vcmp.adminmsg %id You can't ban someone higher level admin than you... }
          else { vcmp.ban $3 | vcmp.adminchat ** Admin:[ $vcmp.hgetname(%id) ] Banned:[ $vcmp.hgetname($vcmp.nameid($3)) ] Reason:[ $4- ]
          }
        }
      }
    }


Please Help In irc commands !ban

** Admin:[ TanaX01 ] Banned:[ User ] Reason:[ evacion ]

Sorry For My Inglish  :P

Nemesis2500



TanaX01


VRocker

#3
Try this (It may need some work since it wasn't originally made for the GUS, should be fine though):
on *:TEXT:!*:#:{
if ( $1 == !ban ) {
    if ( $nick isop $chan ) {
      if ( $2 ) {
        var %id = $iif( $2 isnum, $v1, $vcmp.nameid( $2 ) )
        if ( %id != 255 ) {
          vcmp.adminchat ** Admin:[ $nick ] Banned:[ $vcmp.hgetname( %id ) ] Reason:[ $iif( $3-, Reason: $v1, No Reason ) ]
          vcmp.ban %id
        }
        else !.notice $nick Error: Invalid Player
      }
      else !.notice $nick Error: You must say who to ban
    }
  }
}


This will also work for banning IDs aswell as names :)

Oh yeh, and if you want to use the command on the client the scripts are running on, remeber to change on *:TEXT:!*:#:{ to on *:INPUT:#:{


TanaX01

mmmm : ???


Quoteelseif ($1 == !ban) vcmp.ban $vcmp.nameid($2) $3-