Author Topic: Commands !Ban  (Read 3326 times)

0 Members and 1 Guest are viewing this topic.

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Commands !Ban
« on: June 20, 2008, 03:43:24 am »
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:
Quote
elseif ($1 == !ban) vcmp.ban $vcmp.nameid($2) $3-

In-Game:

Quote
    elseif ($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

Offline Nemesis2500

  • Wiseguy
  • **
  • Posts: 63
  • The Joker
    • View Profile
    • Grand VCMP Server
Re: Commands !Ban
« Reply #1 on: June 20, 2008, 03:45:50 am »
no kcho  ;D


Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Commands !Ban
« Reply #2 on: June 20, 2008, 04:18:12 am »
no kcho  ;D

Please Help In Commands   8)

Offline VRocker

  • LU Developer
  • Wiseguy
  • *
  • Posts: 63
    • View Profile
    • Liberty Unleashed - GTA3 Multiplayer Mod
Re: Commands !Ban
« Reply #3 on: June 20, 2008, 02:03:10 pm »
Try this (It may need some work since it wasn't originally made for the GUS, should be fine though):
Code: [Select]
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:#:{
« Last Edit: June 20, 2008, 02:07:35 pm by VRocker »


Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Commands !Ban
« Reply #4 on: June 20, 2008, 11:22:18 pm »
mmmm : ???


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