SERVER: Unknown Command
#1

I've been working on a housing system for my server, and I just made the enter command. Although it makes me enter the house and does what the command should, it as well gives me a SERVER: Unknown Command. Anybody has an idea how this is happening?

This is my script:
pawn Код:
if(strcmp(cmd,"/enter",true) == 0)
    {
      new hCount = 0;
      for(new h; h <= MAX_HOUSES; h++)
      {
        if(PlayerToPoint(MaxPTP,playerid,HouseInfo[h][hX],HouseInfo[h][hY],HouseInfo[h][hZ]))
        {
          hCount += 1;
          if(HouseInfo[h][hLocked] == 0 || !strcmp(pName,HouseInfo[h][hOwner],true) && IsPlayerLogged(playerid))
          {
                    EnterHouse(playerid,h);
                    if(strcmp(HouseInfo[h][hOwner],pName,true) == 0) format(string,sizeof(string),"SERVER: Welcome home, %s.",pName);
                    else format(string,sizeof(string),"SERVER: Welcome in %s's house, %s.",HouseInfo[h][hOwner],pName);
                    SendClientMessage(playerid,COLOR_ROYALBLUE,string);
                }
                else SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: This house is locked!");
            }
        }
        if(hCount == 0) SendClientMessage(playerid,COLOR_STEELBLUE,"SERVER: You aren't near any house!");
        return 1;
    }
Reply


Messages In This Thread
SERVER: Unknown Command - by Hiddos - 07.04.2010, 14:21
Re: SERVER: Unknown Command - by -Rebel Son- - 07.04.2010, 16:17
Re: SERVER: Unknown Command - by Hiddos - 07.04.2010, 16:25
Re: SERVER: Unknown Command - by Hiddos - 07.04.2010, 20:11
Re: SERVER: Unknown Command - by Hiddos - 08.04.2010, 14:10
Re: SERVER: Unknown Command - by Hiddos - 09.04.2010, 14:29
Re: SERVER: Unknown Command - by Grim_ - 09.04.2010, 14:34
Re: SERVER: Unknown Command - by armyoftwo - 09.04.2010, 14:35
Re: SERVER: Unknown Command - by Hiddos - 09.04.2010, 15:16
Re: SERVER: Unknown Command - by Micko9 - 09.04.2010, 15:22

Forum Jump:


Users browsing this thread: 1 Guest(s)