18.11.2011, 11:28
How i add that pickup
when player take it he get a bike or car !!?
when player take it he get a bike or car !!?
//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.");
}