[UNSOLVED] I realy need help
#1

solved
Reply
#2

pawn Код:
if (strcmp("/help", cmdtext, true, 10) == 0)
Try removing that 10 from all commands.

pawn Код:
if (strcmp("/help", cmdtext, true) == 0)
Reply
#3

solved
Reply
#4

Do you use any filterscripts?
Reply
#5

solved
Reply
#6

Quote:
Originally Posted by Pinehole
Yep, but i dont think it's the problem. someone please help
It is.

Put return 0; at the end of all your filterscripts OnPlayerCommandText to fix it.
Reply
#7

I tested it with no filterscripts, and all my filterscripts were return 0 at the end, it isn't the problem
it has to do something with my gamemode, someome help me
Reply
#8

Uh, you will have pretty much to edit. You are doing it all wrong. Use 'return 0' only at the bottom of the OnPlayerCommandText callback. On all other places use 'return 1' otherwise it shows Unknown Command message:

Example how it should work:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp("/something",cmdtext,true))
  {
    //do something
    return 1;
  }
  if(!strcmp("/someelse",cmdtext,true))
  {
    //do something else
    return 1;
  }
  return 0;
}
Oh and consider using zcmd instead of strcmp, it's easier and faster
Reply
#9

solved
Reply
#10

You are doing it wrong then.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)