06.12.2013, 03:46
Here are the following links you wanna goto and look.
https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
https://sampwiki.blast.hk/wiki/CreateVehicle
And here is the sample code created where you can learn from.
Remember to change the x,y and z to where you want the pickup.
https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
https://sampwiki.blast.hk/wiki/CreateVehicle
And here is the sample code created where you can learn from.
Remember to change the x,y and z to where you want the pickup.
pawn Код:
new pickup;
public OnGameModeInit()
{
pickup = CreatePickup(1247,1,x,y,z,0);
return 1;
}
public OnPlayerPickUpPickup(playerid,pickupid)
{
if(pickupid == pickup)
{
new Float:Pos[4];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2];
GetPlayerFacingAngle(playerid,Pos[3]);
CreateVehicle(560,Pos[0],Pos[1],Pos[2],Pos[3],random(225),random(225),60);
}
return 1;
}

