SA-MP Forums Archive
Checkpoints Please Help - 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: Checkpoints Please Help (/showthread.php?tid=177992)



Checkpoints Please Help - Kevin_Joshen - 20.09.2010

Hey guys… I know I should know this.. but I took a break from scripting and need to know how to do the following:

A player is going through this parkour… then he sees a checkpoint. (need to know how to create a checkpoint)

He enters the checkpoint… it takes his car, and gives him a bullet.


Thanks!
-Kevin


Re: Checkpoints Please Help - Backwardsman97 - 20.09.2010

SetPlayerCheckPoint


Re: Checkpoints Please Help - Kevin_Joshen - 20.09.2010

Thanks, and how do i give the player the bullet and respawn the car he is in?


Re: Checkpoints Please Help - Backwardsman97 - 20.09.2010

You mean give him a bullet and save his car for later?


Re: Checkpoints Please Help - Marshall_Banks - 20.09.2010

cant really remember the codes but it goes like this i think
do a Removeplayerfromvehicle
then Createvehicle
then putplayerinvehicle


Re: Checkpoints Please Help - [HiC]TheKiller - 20.09.2010

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new VID = GetPlayerVehicleID(playerid);
    DestroyVehicle(VID);
    new Float:Pos[4];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerFacingAngle(playerid, Pos[3]);
    new VID2 = CreateVehicle(/*Bullet car model ID*/, Pos[0], Pos[1], Pos[2],  Pos[3], -1, -1, 999999*999);
    PutPlayerInVehicle(playerid, VID2);
    return 1;
}