Another Respawn all unused cars command help
#1

Well has the title states i need help with a command that respawns all non owned unused vehicles to there spawn point, i have the command working but it respawned vehicles that had people in them and trailers too, so i added this
pawn Код:
if((IsVehicleEmpty(vid) && IsTrailerAttachedToVehicle(vid);
then i started getting this code...
Код:
: error 017: undefined symbol "IsVehicleEmpty"
here is my command...
pawn Код:
COMMAND:rac(playerid, params[])
{

    SendAdminText(playerid, "/rac", params);

    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] >= 1)
        {
            for (new vid; vid < 2000; vid++)
            {
                if (AVehicleData[vid][Owned] == false)
                {
                    if((IsVehicleEmpty(vid) && IsTrailerAttachedToVehicle(vid)))//<--Here is the line thats causing the problems
                    {

                       
                        SetVehicleToRespawn(vid);
                        AVehicleData[vid][Owned] = false;
                        AVehicleData[vid][Owner] = 0;
                        AVehicleData[vid][Model] = 0;
                        AVehicleData[vid][PaintJob] = 0;
                        for (new i; i < 14; i++)
                            AVehicleData[vid][Components][i] = 0;
                        AVehicleData[vid][SpawnX] = 0.0;
                        AVehicleData[vid][SpawnY] = 0.0;
                        AVehicleData[vid][SpawnZ] = 0.0;
                        AVehicleData[vid][SpawnRot] = 0.0;
                        AVehicleData[vid][BelongsToHouse] = 0;
                    }
                }
            }

        }
        else
            return 0;
    }
    else
        return 0;

    return 1;
}
And i of course searched around and tryed different methods to define "IsVehicleEmpty" but failed and made more errors, most likely overseeing something simple.
Any suggestions
Thanks
Nick
Reply


Messages In This Thread
Another Respawn all unused cars command help - by nickdodd25 - 21.03.2012, 00:29
Re: Another Respawn all unused cars command help - by Tanush123 - 21.03.2012, 00:59
Re: Another Respawn all unused cars command help - by nickdodd25 - 21.03.2012, 03:36
Re: Another Respawn all unused cars command help - by MP2 - 21.03.2012, 05:15
Re: Another Respawn all unused cars command help - by nickdodd25 - 21.03.2012, 14:14
Re: Another Respawn all unused cars command help - by Joshb93 - 21.03.2012, 15:29
Re: Another Respawn all unused cars command help - by Tween73 - 01.03.2015, 23:09

Forum Jump:


Users browsing this thread: 1 Guest(s)