How do I make a pick-up that gives you a car?
#1

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

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;
   
}
Reply
#3

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.
Reply
#4

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)