CreateVehicle problem and Adminsystem Problem
#9

You need to save all created vehicles IDs

top of your script
pawn Код:
new CreatedVehicles[100];
command that creates vehicles
pawn Код:
for(new i=0; i < sizeof(CreatedVehicles); i++)
{
    if(CreatedVehicles[i] == 0)
    {
        CreatedVehicles[i] = CreateVehicle(...);
        break;
    }
}
pawn Код:
public OnVehicleSpawn(vehicleid)
{
    for(new i=0; i < sizeof(CreatedVehicles); i++)
    {
        if(CreatedVehicles[i] == vehicleid)
        {
            DestroyVehicle(vehicleid);
            CreatedVehicles[i] = 0;
            break;
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)