• Welcome to Vice City Multiplayer.
 

Help in kick error

Started by TanaX01, July 26, 2008, 10:41:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TanaX01

hey

help my

in commands kick i quit !kick a kick

   elseif ($2 == kick) {
     if ($hget(vcmp,loggedin. $+ %id) < 2) { 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 kick someone higher level admin than you... }
         else { vcmp.kick2 $3 | vcmp.adminchat ** Admin $vcmp.hgetname(%id) kicked player:[ $vcmp.hgetname($vcmp.nameid($3)) ] Reason:[ $4- ]
         }
       }
     }
   }


code alias

alias vcmp.kick {
 vcmp.adminchat ** Admin $vcmp.hgetname(%id) kicking player:[ $$vcmp.hgetname($vcmp.nameid($1)) ] $iif($2,Reason:[ $4- ],)
 .timer. $+ $$vcmp.nameid($1) $+ .kick -m 1 250 vcmp.command kick $$vcmp.nameid($1)
}
alias vcmp.kick2 {
 ** Admin $nick kicking player:[ $$vcmp.hgetname($vcmp.nameid($1)) ] $iif($2,Reason:[ $4- ],)
 .timer. $+ $$vcmp.nameid($1) $+ .kick -m 1 250 vcmp.command kick $$vcmp.nameid($1)
}


in game  /c kick tanax01 test

<MarciSpeems> ** 0 TaNaX01 joined the server.
<MarciSpeems> ** Admin kicking player:[ TaNaX01 ]
<MarciSpeems> ** 0 TaNaX01 left the server. (Kicked)


please help in Admin TanaX kicked player:[ tanax01 ] Reason:[ test ] ;)

Tamas

Yeah
I have the same problem too
<@BootRobocop> ** Admin kicked player: [SRS]Tomi Reason: noob

But the code is seems to be good:
else { vcmp.kick2 $3 | vcmp.adminchat ** Admin $vcmp.hgetname(%id) kicked player: [ $vcmp.hgetname($vcmp.nameid($3)) ] Reason: [ $4- ]

The problem is in the : $vcmp.hgetname(%id) code.


TanaX01

#2
Quote from: [SRS]Tomi on July 26, 2008, 11:22:09 PM
Yeah
I have the same problem too
<@BootRobocop> ** Admin kicked player: [SRS]Tomi Reason: noob

But the code is seems to be good:
else { vcmp.kick2 $3 | vcmp.adminchat ** Admin $vcmp.hgetname(%id) kicked player: [ $vcmp.hgetname($vcmp.nameid($3)) ] Reason: [ $4- ]

The problem is in the : $vcmp.hgetname(%id) code.



WTF is error ! look alias   8)

Please Help

bakasan

#3
it could be the brackets

maybe try using bra (wraps in brackets) because brackets can also be used for evaluation in mirc

;--- misc aliases
alias par !return $chr(40) $+ $1 $+ $chr(41)
alias bra !return $chr(91) $+ $1 $+ $chr(93)


that is... if i even understand the problem correctly..

thijn

Try this:
   elseif ($2 == kick) {
     if ($hget(vcmp,loggedin. $+ %id) < 2) { 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 kick someone higher level admin than you... }
         else { vcmp.kick %id $3 $4- | vcmp.adminchat ** Admin $vcmp.hgetname(%id) kicked player:[ $vcmp.hgetname($vcmp.nameid($3)) ] Reason:[ $4- ]
         }
       }
     }
   }


code alias

alias vcmp.kick {
 vcmp.adminchat ** Admin $vcmp.hgetname($1) kicking player:[ $$vcmp.hgetname($vcmp.nameid($2)) ] $iif($2,Reason:[ $3- ],)
 .timer. $+ $$vcmp.nameid($1) $+ .kick -m 1 250 vcmp.command kick $$vcmp.nameid($2)
}
alias vcmp.kick2 {
 ** Admin $nick kicking player:[ $$vcmp.hgetname($vcmp.nameid($1)) ] $iif($2,Reason:[ $4- ],)
 .timer. $+ $$vcmp.nameid($1) $+ .kick -m 1 250 vcmp.command kick $$vcmp.nameid($1)
}

NOTE: UNTESTED!!!


TanaX01

thijn Thx friend nice aport  8)


Nemesis2500