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

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!");
            }
        }
    }
    return 1;
}
That should fix it.

[Doppeyy
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: 2 Guest(s)