change veh location create
#2

Use SetVehiclePos(vehicleid, Float:X, Float:Y, Float:Z); to put the car at the dealership.
Use a loop trough all the vehicles and get their position and then compare that position to the position of the dealership, if true, use SetVehiclePos, but then with different cords.

Example for the loop:

pawn Code:
new bool CarAtDealerShip[MAX_VEHICLES] = false; // somewhere on top of your script.

for(i = 0; i < MAX_VEHICLES; i++) // Looping trough all the vehicles in the server.
{
    new Float:X, Float:Y, Float:Z;
    GetVehiclePos(i, Float:X, Float:Y, Float:Z);
    if(Float:X == Your_Cord && Float:Y == Your_Cord && Float:Z == Your_Cord)
    {
         CarAtDealership[i] = true;
    }
    else
    {
          CarAtDealership[i] = false;
    }
}
Now simply put the bool CarAtDealership before the SetVehiclePos in your command, and fill in your cords
Reply


Messages In This Thread
change veh location create - by qUick1337 - 08.09.2011, 17:12
Re: change veh location create - by judothijs - 08.09.2011, 18:24
Re: change veh location create - by qUick1337 - 09.09.2011, 09:51
Re: change veh location create - by judothijs - 10.09.2011, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)