SA-MP Forums Archive
undefined symbol "VehicleOccupied" plz define this line!!!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: undefined symbol "VehicleOccupied" plz define this line!!!! (/showthread.php?tid=259950)



undefined symbol "VehicleOccupied" plz define this line!!!! - Iphone1234g - 06.06.2011

okey here is code
Код:
SetTimer("CarRespawn",10000,0); // Change the amount of milisecounds to what you need.

forward CarRespawn();
public CarRespawn()
{
    for(new cars=0; cars<MAX_VEHICLES; cars++)
    {
        if(!VehicleOccupied(cars))
        {
            SetVehicleToRespawn(cars);
            RepairVehicle(cars);
        }
   }
return 1;
}

and this error i got plz help me me new in this matter
Код:
H:\Documents and Settings\Bilawal2o5o\Desktop\poilts life\gamemodes\gtapilots.pwn(4461) : error 017: undefined symbol "VehicleOccupied"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: undefined symbol "VehicleOccupied" plz define this line!!!! - Bob_Raw - 06.06.2011

have you tried useing this code
Код:
 new VehicleOccupied;
At the top of the script?


Re: undefined symbol "VehicleOccupied" plz define this line!!!! - TheGarfield - 06.06.2011

pawn Код:
#define VehicleOccupied(%0) IsPlayerInAnyVehicle(%0)
...


Re: undefined symbol "VehicleOccupied" plz define this line!!!! - Markx - 06.06.2011

You usually get errors because your copying of scripts ;)


Re: undefined symbol "VehicleOccupied" plz define this line!!!! - sleepysnowflake - 06.06.2011

I thought you will add this too:

pawn Код:
forward VehicleOccupied(vehicleid);

public VehicleOccupied(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return 0;
}



Re: undefined symbol "VehicleOccupied" plz define this line!!!! - Iphone1234g - 06.06.2011

waht is the work of this code plz reply


Re: undefined symbol "VehicleOccupied" plz define this line!!!! - Namaco - 06.06.2011

respawn vehicles to their main location?


Respuesta: undefined symbol "VehicleOccupied" plz define this line!!!! - Lunnatiicz - 06.06.2011

Use AddStaticVehicle & this function respawn X time the vehicle ._.


Re: undefined symbol "VehicleOccupied" plz define this line!!!! - sleepysnowflake - 06.06.2011

He need them to respawn after 5 secounds when player teleports on a custom map ... Otherwise they would fall in the water.


Re: undefined symbol "VehicleOccupied" plz define this line!!!! - Iphone1234g - 07.06.2011

not player fall in water only vehicles go in water can i use a way to load objects fast? or i add dynamic vehicles!!!!


and i want to respawn all cars without useing cars