I don't know what you mean with levitate, but you can just set the plane:
- Origin
- View angle (to the direction)
- And pev_velocity
For make players follow the plane, you just need set them the same vectors of the plane and set their gravity and maxspeed to 0. (can't fall and can't move inside the plane).
That's the code I'm using on my Battleground to create the plane:
PHP Code:
public createPlane()
{
new Float:fOrigin[3], Float:fAngle[3], Float:fVelocity[3]
getRandomPlaneDirection(fOrigin, fAngle, fVelocity) //the code that gets four random directions
new iEnt = fm_create_entity("info_target")
fm_create_ent
(
iEnt,
g_szClassNamesData[cTransporter],
g_szModelsData[mTransporter],
fOrigin,
fVelocity,
fAngle
) // code to create the plane
g_bPlaneSpanwed = true
g_iEnt[pPlaneTransporter] = iEnt
fOrigin[2] -= 40.0 // players under the plane.
new iPlayers[MAX_PLAYERS], iNum
get_players(iPlayers, iNum, "ach")
for(new i, id;i < iNum;i++)
{
id = iPlayers[i]
setInvisibility(id, true) // for players can't be seen by their enemies.
client_cmd(id, "spk ^"%s^"", g_szSoundsData[sTransporter]) // sound of the plane
//here are all vectors for players be able to follow the plane
set_pev(id, pev_origin, fOrigin) // Same origin of the plane
set_pev(id, pev_angles, fAngle) // Same direction of the plane
set_pev(id, pev_fixangle, 1) // Fix the angle
set_pev(id, pev_velocity, fVelocity) // Same velocity of the plane
set_pev(id, pev_gravity, 0.000001) //Can't fall
set_pev(id, pev_maxspeed, 0.000001) //Can't move
// some booleans to use later.
g_dUserData[id][bIsOnPlane] = true
g_dUserData[id][bCanUseParachute] = false
}
// to remove the plane
set_task(PLANE_REMOVE_TIME, "checkPlaneOrigin", TASK_PLANE)
}
__________________