[SOLVED] Commands only works for RCON Admins
#1

Hi all,

here I am (again) to ask you guys something. Check this out:

pawn Код:
if(strcmp(cmdtext,"/animacoes", true) == 0 || strcmp(cmdtext,"/anim", true) == 0)   {
      SendClientMessage(playerid, COR_ROXO, "|___________________________| ANIMAЗХES |_________________________|");
      SendClientMessage(playerid, COR_VERMELHO, "> /fp - Fumar (na parede), /cigarro - Acender um cigarro");
      SendClientMessage(playerid, COR_VERMELHO, "> /beber - Beber de uma Garrafa");
      SendClientMessage(playerid, COR_ROXO, "|_________________________________________________________________|");
        return 1;
    }
As you can see, it's a VERY SIMPLE text script. Notice that there're NO if(!IsPlayerAdmin(playerid) in this. Even with this code, I log in and type /animacoes (or /anim) and I got this:

Quote:

Vocк nгo estб logado como um Admin RCON! (portuguese)
- or -
You're not logged in as an RCON Admin! (english)

Then I tought, well, there must be some commands f*cking the whole script, I better take one by one out (with /* */) to test it. No results, than I just did /* */ on ALL commands that had the previous sentence (Vocк nгo estб logado como um Admin RCON!) and guess what - I received THE SAME MESSAGE, even not been officially in the script (as I did /* */)

I'm kinda pissed of here, so if anybody wants to help me, I guess I'll be very grateful.

Regards,

CaZeaJe~
Reply
#2

There's probably an admin check at the start of the OnPlayerCommandText-callback.

Something like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!IsPlayerAdmin(playerid)) return 0;
  // commands..
  return 0;
}
Reply
#3

Try to disable everything before the command under OnPlayerCommandText with /* */.
Reply
#4

Quote:
Originally Posted by MadeMan
Try to disable everything before the command under OnPlayerCommandText with /* */.
Quote:
Originally Posted by Don Correlli
There's probably an admin check at the start of the OnPlayerCommandText-callback.

Something like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!IsPlayerAdmin(playerid)) return 0;
  // commands..
  return 0;
}
Neither worked. I disabled all the !IsPlayerAdmin from the WHOLE script! OMG... will I have to start all over again? Don't tell me this

Thanks you guys anyway.
Reply
#5

Do you use any filterscripts?
Reply
#6

Quote:
Originally Posted by MadeMan
Do you use any filterscripts?
FS doesnt give any reaction to GM.I tried this.
Reply
#7

Quote:
Originally Posted by _Saif_
Quote:
Originally Posted by MadeMan
Do you use any filterscripts?
FS doesnt give any reaction to GM.I tried this.
I just tested it. If you have return 1 in FS OnPlayerCommandText it will block all commands from GM.
Reply
#8

Quote:
Originally Posted by MadeMan
Do you use any filterscripts?
I'm using Error's Registration system. I'll try to disable it. It won't hurt

When I do, I edit this post.

Thanks.
Reply
#9

Thats probably the problem, on my server no commands worked at all when that fs were loaded, removed the fs and all worked fine
Reply
#10

Quote:
Originally Posted by JoeDaDude
Thats probably the problem, on my server no commands worked at all when that fs were loaded, removed the fs and all worked fine
Ok, at first I thought it, but then I changed my mind. So, if you've tried it already, I'll consider this as SOLVED.

Thanks for everyone's answers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)