[ERROR] HELP ME! UNKNOWN COMMAND...
#1

where is incorrect on my command? Because this send a message "Unknown Command" in server...
the command works. But it sends "Unknown command" after "Spec On!"

pawn Код:
dcmd_spec(playerid,params[])
{
  if(IsPlayerAdmin(playerid))
    {
      if(!strlen(params) || !IsNumeric(params)) return
        SendClientMessage(playerid, LIGHTBLUE2, "Usage: /lspec [PlayerID]") &&
        SendClientMessage(playerid, orange, "Function: Will spec a specified Player");

        new specid = strval(params);
       
    if(IsPlayerConnected(specplayerid) && specid != INVALID_PLAYER_ID)
        {
            if(specid == playerid)
            return SendClientMessage(playerid, red, "ERROR");
            if(GetPlayerState(specid) == PLAYER_STATE_SPECTATING && INFO[specid][ID] != INVALID_PLAYER_ID)
            return SendClientMessage(playerid, red, "ERROR");
            if(GetPlayerState(specid) != 2 && GetPlayerState(specplayerid) != 1 && GetPlayerState(specplayerid) != 3)
            return SendClientMessage(playerid, red, "ERROR");
           
            if( (INFO[specid][POSI] != svInfo[ADM]) || (INFO[specid][POSI] == svInfo[ADM] && INFO[playerid][POSI] == svInfo[ADM]))
            {
                LoadSpec(playerid, specid);
                GetPlayerPos(playerid,POSITION[playerid][0],POSITION[playerid][1],POSITION[playerid][2]);
                GetPlayerFacingAngle(playerid,POSITION[playerid][3]);
                return SendClientMessage(playerid,blue,"Spec ON!");
            }
        }
    }
}
Reply


Messages In This Thread
[ERROR] HELP ME! UNKNOWN COMMAND... - by Jack321 - 30.01.2010, 20:22
Re: [ERROR] HELP ME! UNKNOWN COMMAND... - by Doppeyy - 30.01.2010, 20:25
Re: [ERROR] HELP ME! UNKNOWN COMMAND... - by LuxurioN™ - 30.01.2010, 20:30
Re: [ERROR] HELP ME! UNKNOWN COMMAND... - by Jack321 - 30.01.2010, 20:33
Re: [ERROR] HELP ME! UNKNOWN COMMAND... - by Jack321 - 30.01.2010, 22:25

Forum Jump:


Users browsing this thread: 3 Guest(s)