SA-MP Forums Archive
Car into Interior - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car into Interior (/showthread.php?tid=98364)



Car into Interior - [NYRP]Mike. - 20.09.2009

How can i do it so if you drive a car into an Checkpoint it sends it to an interior?, Thanks.

-Mike.


Re: Car into Interior - Nero_3D - 20.09.2009

OnPlayerEnterCheckpoint - LinkVehicleToInterior

If you need help with a checkpoint system, search or look in some standard modes with checkpoints (like area51.pwn),
help about the function LinkVehicleToInterior, use wiki


Re: Car into Interior - [NYRP]Mike. - 20.09.2009

Thanks but i meant without defining the car it's self.

-Mike.


Re: Car into Interior - Nero_3D - 20.09.2009

not hard, here an example (with standard array names out of standard modes)

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    switch(gPlayerCheckpointStatus[playerid])
    {
        case THE_CHECKPOINT_YOU_WANTED:
        {
            SetPlayerInterior(playerid, 7);
            if(IsPlayerInAnyVehicle(playerid)) LinkVehicleToInterior(GetPlayerVehicleID(playerid), 7);
        }
    }
}