Assigning variables to vehicles
#1

I'm trying to make a system, to where when you click a dialog list button, it spawns that selected vehicle on a certain spot.. But I'm trying to think of a way where I can assign it to a variable so I can despawn/destroy it later with a command.
Reply
#2

When you create a vehicle, it returns the vehicle ID. Ex:

pawn Код:
new mySpawnedVehicle;

public OnGameModeInit()
{
    mySpawnedVehicle = CreateVehicle(411, ...);
    return 1;
}

DestroyVehicle(mySpawnedVehicle);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)