Typing commands twice
#1

Does anyone know why i may have to type a command twice to trigger it? The first time nothing happens, the seconds time it'd work. anyone know any causes for it?
Reply
#2

pawn Код:
new cmdtrigger = 0;
if(strcmp(cmdtext, "/somecmd") == 0)
{
  if(cmdtrigger == 0)
  {
    //nothing happens
    cmdtrigger++;
    return 1;
  }
  else
  {
    //command gets executed
    cmdtrigger = 0;
    return 1;
  }
}
Reply
#3

er, that'd make it need to be typed twice, i'm trying to figure out how to STOP it, I have a bug in my script somewhere, i just need to know what causes it, it affects all commands, and there is nothing like that in it.
Reply
#4

Quote:
Originally Posted by Redirect Left
er, that'd make it need to be typed twice, i'm trying to figure out how to STOP it, I have a bug in my script somewhere, i just need to know what causes it, it affects all commands, and there is nothing like that in it.
Well unless you want to share your code, we can't do anything, re-look trough your OPCT callback.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)