SA-MP Forums Archive
How do I make a pick-up that gives you a car? - 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: How do I make a pick-up that gives you a car? (/showthread.php?tid=275206)



How do I make a pick-up that gives you a car? - Andr3y9603 - 08.08.2011

how do when a player enters a pick-up to give him a car? help


Re: How do I make a pick-up that gives you a car? - Scarred - 08.08.2011

pawn Код:
new
    Vehicle, Pickup;
   
public OnPlayerEnterPickup(playerid, pickupid)
{

    if(pickupid == Pickup) {
        new
            Float:Pos[4];
           
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        GetPlayerFacingAngle(playerid, Pos[3]);
       
        Vehicle = CreateVehicle(VEHICLEID, Pos[0], Pos[1], Pos[2], Pos[3], COLOR1, COLOR2);
    }
    return true;
   
}



Re: How do I make a pick-up that gives you a car? - Kitten - 08.08.2011

1.http: //wiki.sa-mp.com/wiki/CreatePickup
2.http: //wiki.sa-mp.com/wiki/OnPlayerPickUpPickup

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickupidlol) {
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerd,x,y,z);
        CreateVehicle((modelid, Float:X, Float:Y, Float:Z, Float:angle, color1, color2, respawn_delay);
    }
    return 1;
}
EDIT: im to late eh.


Re : How do I make a pick-up that gives you a car? - Soumi - 08.08.2011

https://sampwiki.blast.hk/wiki/Function:PutPlayerInVehicle

You can use this to Put the player in the vehicle.