Author Topic: [RESOLVED] - Major help needed, its not checking your admin level - [RESOLVED]  (Read 4852 times)

0 Members and 1 Guest are viewing this topic.

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Hey,

I am having major, major, problems. I thought I was ready to release my server but it seems not. I am using sansan and I have a lot of admin commands, however, its not even checking your level, its letting registered and non registered players use all admin commands apart from !slap...

Any ideas?
« Last Edit: July 07, 2008, 06:48:32 pm by [SDT]F_T_F0RC3 »

Offline Mattz

  • VC:MP Lead Tester
  • Made Man
  • *
  • Posts: 192
  • BK-201
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #1 on: July 06, 2008, 08:22:19 pm »
Just check the other admin cmds and the level reader.

Look at this one.

Code: [Select]
elseif ($2 == !ban) {
      if ($hget(vcmp,loggedin. $+ %id) < 5) { vcmp.adminmsg %id You must be Admin Level 5 or higher to attempt this command. | vcmp.kick %id }
      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... | vcmp.kick %id }
          else { vcmp.ban $vcmp.nameid($3) $iif($4-,Reason: $4-) }
        }
      }
    }

Code: [Select]
if ($hget(vcmp,loggedin. $+ %id) < 5)
Code: [Select]
if ($hget(vcmp,loggedin. $+ %id) < $hget(vcmp,loggedin. $+ $vcmp.nameid($3)))


Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #2 on: July 06, 2008, 08:37:37 pm »
Yeah I have checked the other's and its doing it for every single command...the only one that does check it is !slap.... It's weird...

Offline Jack_Bauer

  • Wiseguy
  • **
  • Posts: 58
  • GTA:MP Clan Revolution
    • View Profile
    • Battlefield Vice City
Re: Major help needed, its not checking your admin level
« Reply #3 on: July 07, 2008, 01:22:38 am »
make sure you have all commands closed ( } ) couse i was having some problem that a message was popping up even not using that command



Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #4 on: July 07, 2008, 05:30:26 pm »
Thanks jack but what makes it even more confusing is that the mirc script editor says that there are no errors  :-X ???

Offline ReVilo

  • Wiseguy
  • **
  • Posts: 64
  • Master of All that is Holy
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #5 on: July 07, 2008, 05:59:06 pm »
Try resetting all the accounts. Once my accountdata file became corrupted and everyone got admin rights .-.

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #6 on: July 07, 2008, 06:04:03 pm »
Lol, I will try that then  :-\

Edit: Is there any way to tell whether or not it is corrupted? I can open it fine and every one's levels are 1 apart from mine and my mate's.
« Last Edit: July 07, 2008, 06:15:31 pm by [SDT]F_T_F0RC3 »

Offline ReVilo

  • Wiseguy
  • **
  • Posts: 64
  • Master of All that is Holy
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #7 on: July 07, 2008, 06:38:23 pm »
I meant that there was a bug in the script, and it did writeini, but it didn't do it properly then the whole file got sort of 'off' kilter.

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Major help needed, its not checking your admin level
« Reply #8 on: July 07, 2008, 06:44:29 pm »
Ohh right, well never mind because i fixed it now :D :D :D...

The problem was for some reason in the script there was  NO { } 's on the adminmsg %id You must be Level "blah" to use this command!

Now I am happy :D
« Last Edit: July 07, 2008, 06:49:02 pm by [SDT]F_T_F0RC3 »