Car Pickup
#2

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup)
    PutPlayerInVehicle(playerid, 411, 0);
    return 1;
}
The code above is wrong because you are checking if a player picked up a pickupid named PICKUP which your pickup created is named vehicle.

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == vehicle)
{
new Float:X,Float:Y,Float:Z,CAR[MAX_PLAYERS];
GetPlayerPos(playerid,X,Y,Z);
CAR[playerid] = CreateVehicle(411,X,Y,Z,0,0,0,-1);
    PutPlayerInVehicle(CAR[playerid], 411, 0);
}
    return 1;
}
That is ofc if you dont have created vehicle , if u do update the code similiar to mine and after the car is not needed delete it.
Reply


Messages In This Thread
Car Pickup - by Cenation - 11.06.2011, 06:56
Re: Car Pickup - by 0ne - 11.06.2011, 07:12
Re: Car Pickup - by Cenation - 11.06.2011, 07:16

Forum Jump:


Users browsing this thread: 1 Guest(s)