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.