SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   Respawn (https://forum.sa-mp.com/showthread.php?t=653820)

KamilPolska 13/05/2018 06:30 PM

Respawn
 
How to make respawn of all the trailers that I created.
And the trailer should not disappear when the player is connected to the truck.

KamilPolska 14/05/2018 03:33 PM

Re: Respawn
 
How to make respawn for these trailers after writing a command.
Code:

Trailer[0][ID_Trailer] = CreateVehicle(591, 1630.7227, -1089.4471, 24.5123, 269.7912, -1, -1, -1);
Trailer[1][ID_Trailer] = CreateVehicle(591, 1630.7227, -1089.4471, 24.5123, 269.7912, -1, -1, -1);
Trailer[2][ID_Trailer] = CreateVehicle(591, 1630.7227, -1089.4471, 24.5123, 269.7912, -1, -1, -1);


GTLS 15/05/2018 06:38 AM

Re: Respawn
 
http://wiki.sa-mp.com/wiki/SetVehicleToRespawn - SetVehicleToRespawn to Respawn your vehicles.

KamilPolska 15/05/2018 07:04 PM

Re: Respawn
 
Player has a connected trailer, how to make it not respawn.

GTLS 16/05/2018 05:07 AM

Re: Respawn
 
Then I suppose you will have to respawn the trailer manually one by one. Using their IDs. (/dl)

KamilPolska 16/05/2018 06:27 PM

Re: Respawn
 
I wanted to do CMD for unused trailers. If the player is not sitting in a trailer, then the trailer should be respawn. Just how to do it?

CyNiC 17/05/2018 12:16 AM

Re: Respawn
 
pawn Code:
stock SetAllVehicleToRespawn()
{
    new trailers[MAX_VEHICLES/2];

    for(new i = 1, j; i < MAX_VEHICLES; i++)
    {
        for(new k = 0; k < j; k++) if(i == trailers[k])   goto Continue;

        if(IsTrailerAttachedToVehicle(i))
        {
            trailers[j] = GetVehicleTrailer(i);
            j++;
            continue;
        }
        SetVehicleToRespawn(i);
        Continue:
    }
}

KamilPolska 17/05/2018 10:55 AM

Re: Respawn
 
<REMOVED>


All times are GMT. The time now is 04:13 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.