21.03.2012, 00:29
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
then i started getting this code...
here is my command...
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
pawn Код:
if((IsVehicleEmpty(vid) && IsTrailerAttachedToVehicle(vid);
Код:
: error 017: undefined symbol "IsVehicleEmpty"
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;
}
Any suggestions
Thanks
Nick