Respawn all unused cars
#1

Hey I'm using PPC_TRUCKING and this is the code:
pawn Код:
CMD:respawnallcars(playerid,params[])
    {
      if(IsPlayerConnected(playerid))
      {
        if (APlayerData[playerid][PlayerLevel] < 3)
            {
              SendClientMessage(playerid, 0xFF0000FF, "You are not authorized to use that command!");
              return 1;
            }
            new bool:unwanted[CAR_AMOUNT];         
            for(new player=0; player<MAX_PLAYERS; player++)
        {
        if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
        }
            for(new car = 1; car <= 268; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
            BroadCast(0xFFFFFFFF,string);
        }
        return 1;
    }
But i get these errors:
pawn Код:
C:\Documents and Settings\wumpyc\Desktop\PPC_Trucking6\pawno\include\PPC_PlayerCommands.inc(10) : warning 217: loose indentation
C:\Documents and Settings\wumpyc\Desktop\PPC_Trucking6\pawno\include\PPC_PlayerCommands.inc(10) : error 017: undefined symbol "CAR_AMOUNT"
C:\Documents and Settings\wumpyc\Desktop\PPC_Trucking6\pawno\include\PPC_PlayerCommands.inc(10) : error 009: invalid array size (negative, zero or out of bounds)
C:\Documents and Settings\wumpyc\Desktop\PPC_Trucking6\pawno\include\PPC_PlayerCommands.inc(10) : error 036: empty statement
C:\Documents and Settings\wumpyc\Desktop\PPC_Trucking6\pawno\include\PPC_PlayerCommands.inc(10) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Help pls
Reply
#2

http://pastebin.com/e29nBxEz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)