How to respawn vehicles without trailer?
#1

Hello everyone. I am asking you for help. I want to make spawn for all vehicles except for trailers that are attached to vehicles. What should I do to do this?
Reply
#2

pawn Код:
forward RespawnCars();
public RespawnCars()
{
    new bool:VehUsed[MAX_VEHICLES],vehID;

    for(new playerid,g = GetMaxPlayers(); playerid != g; playerid++)
        if(IsPlayerConnected(playerid))
        {
            vehID = GetPlayerVehicleID(playerid);
            if(vehID > 0)
            {
                VehUsed[vehID] = true;
                new vehMod = GetVehicleModel(vehID);
                if(vehMod == 403 || vehMod == 514 || vehMod == 515 || vehMod == 525 || vehMod == 531 || vehMod == 572 || vehMod == 583) // Linerunner,Tanker,Roadtrain,Towtruck,Tractor,Mower,Tug
                {
                    vehID = GetVehicleTrailer(vehID);
                    if(vehID > 0)
                        VehUsed[vehID] = true;
                }
            }
        }

    for(new vehicleid = 1; vehicleid != MAX_VEHICLES; vehicleid++)
        if(!VehUsed[vehicleid] && IsValidVehicle(vehicleid))
            SetVehicleToRespawn(vehicleid);

    return;
}
Reply
#3

You could have linked the thread link instead of just copy-pasting and 'claim it as yours'.

Reference: https://sampforum.blast.hk/showthread.php?tid=420526
Reply
#4

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
You could have linked the thread link instead of just copy-pasting and 'claim it as yours'.

Reference: https://sampforum.blast.hk/showthread.php?tid=420526
I love how you assume I claimed it as my own 😂 did I state I made it for them.. noo so keep your 2 cents to yourself
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)