/addcar - when i do it i get "Unknown Command"
#1

pawn Code:
if(!strcmp(cmdtext,"/addcar",true))
    {
      if(IsPlayerAdmin(playerid))
      {
            new Car;
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)){ return SendClientMessage(playerid, GREY,"USAGE: /addcar [ModelID] [Color1] [Color2] [Price] [Description]");}
            new CarModel=strval(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)){ return SendClientMessage(playerid, GREY,"USAGE: /addcar [ModelID] [Color1] [Color2] [Price] [Description]");}
            new CarColor1=strval(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)){ return SendClientMessage(playerid, GREY,"USAGE: /addcar [ModelID] [Color1] [Color2] [Price] [Description]");}
            new CarColor2=strval(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)){ return SendClientMessage(playerid, GREY,"USAGE: /addcar [ModelID] [Color1] [Color2] [Price] [Description]");}
//          new CarPrice=strval(tmp);
//          tmp = strtok(cmdtext, idx);
//          if(!strlen(tmp)){ return SendClientMessage(playerid, GREY,"USAGE: /addcar [ModelID] [Color1] [Color2] [Price] [Description]");}
//          new CarDescription[128];
//          if(!strlen(tmp)){ return SendClientMessage(playerid, GREY,"USAGE: /addcar [ModelID] [Color1] [Color2] [Price] [Description]");}
            new Float:CarX,Float:CarY,Float:CarZ,Float:CarA;
            GetPlayerPos(playerid,CarX,CarY,CarZ);
            GetPlayerFacingAngle(playerid,CarA);
            CarInfo[Car][cModel]=CarModel;
            CarInfo[Car][cX]=CarX;
            CarInfo[Car][cY]=CarY;
            CarInfo[Car][cZ]=CarZ;
            CarInfo[Car][cA]=CarA;
            CarInfo[Car][cColor1]=CarColor1;
            CarInfo[Car][cColor2]=CarColor2;
            CarInfo[Car][cOwned]=0;
//          CarInfo[Car][cOwner]=
//          CarInfo[Car][cDescription]=CarDescription
//          CarInfo[Car][cPrice]=CarPrice;
            CarInfo[Car][cLock]=0;
            CarInfo[Car][cResTime]=999999;
            CreateVehicle(CarInfo[Car][cModel],CarInfo[Car][cX],CarInfo[Car][cY],CarInfo[Car][cZ],CarInfo[Car][cA],CarInfo[Car][cColor1],CarInfo[Car][cColor2],CarInfo[Car][cResTime]);
            SaveCars(Car);
        return 1;
        }
        else return SendClientMessage(playerid,GREY,"Attempt Denied, You are not an Administrator!");
    }
Can someone tell me whats wrong with it?
Reply


Messages In This Thread
/addcar - when i do it i get "Unknown Command" - by Castle - 26.02.2010, 01:22
Re: /addcar - when i do it i get "Unknown Command" - by Norn - 26.02.2010, 01:30
Re: /addcar - when i do it i get "Unknown Command" - by Castle - 26.02.2010, 01:40
Re: /addcar - when i do it i get "Unknown Command" - by Norn - 26.02.2010, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)