SA-MP Forums Archive
Pick up [HELP] - 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)
+--- Thread: Pick up [HELP] (/showthread.php?tid=297895)



Pick up [HELP] - K4P3L_KUM4R - 18.11.2011

How i add that pickup
when player take it he get a bike or car !!?


Re: Pick up [HELP] - antonio112 - 18.11.2011

Something like:
pawn Код:
//under includes
new CarPickup;
new g_pVeh[MAX_PLAYERS];

//OnGameModeInit
CarPickup = CreatePickup(1239, 2, X, Y, Z, -1);


//OnPlayerPickupPickUp

if(pickupid == CarPickup)
{
       new Float:Pos[4];
       DestroyVehicle(g_pVeh[playerid]);
       GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
       GetPlayerFacingAngle(playerid, Pos[3]);
       g_pVeh[playerid] = CreateVehicle(560, Pos[0], Pos[1], Pos[2], Pos[3], 0, 0, 5000000);
       PutPlayerInVehicle(playerid, g_pVeh[playerid], 0);
       SendClientMessage(playerid, -1, "Vehicle created.");
}



Re: Pick up [HELP] - K4P3L_KUM4R - 18.11.2011

Thanks Bro Repu Added