Why doesn't this work ?
#1

It just doesn't work, i don't know why. I want to have spaces in the name of the command.

pawn Код:
if(strcmp(cmd, "/command space", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    //Some code over here.
   }
}
Please help, thank you.
Reply
#2

Hmm,try:
pawn Код:
if (strcmp("/command space", cmdtext, true, 14) == 0)
    {
    if(IsPlayerConnected(playerid))
   {
    //Some code over here.
   }
    return 1;
    }
I Didnt test it,But this is may work.
The 14 means the number of characters.

Wow the indentation fucked.
Reply
#3

It's working, thanks Firefox.
Reply
#4

Use strtok or sscanf.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)