help with PutPlayerToVeh

Started by MEGAMIND, Aug 08, 2018, 10:46 AM

Previous topic - Next topic

MEGAMIND

ik that function doesnt exits  PutPlayerToVeh but it ws in like pawno 0.3 vcmp

so as the topic makes it familiar, how do u put a player directly to a vehicle
like my question is like if a take a pickup or soething or even do a cmd
so how will be a player directly siting in a vehicle?

example : /bike ---> // so the player sits in a bike or u can say that the player is put in to the bike directly

so any example or snippets on this question

Regards

vitogta

player.Vehicle = ::CreateVehicle(217, 0, player.Pos.x, player.Pos.y, player.Pos.z+1, player.Angle, 1, 1);

MEGAMIND

Quote from: vitogta on Aug 08, 2018, 10:50 AMplayer.Vehicle = ::CreateVehicle(217, 0, player.Pos.x, player.Pos.y, player.Pos.z+1, player.Angle, 1, 1);
appreciative + i had also found this
globalCount <- 0;
vehs <- [
CreateVehicle(141, 1, Vector(-54.2794, 986.151, 15.9403), -1.6069, 0, 0),
CreateVehicle(141, 1, Vector(X, Y, Z),A, 0, 0),
CreateVehicle(141, 1, Vector(X, Y, Z), A, 0, 0),
CreateVehicle(141, 1, Vector(X, Y, Z), A, 0, 0)
];
function onPlayerCommand( player, cmd, text )
{
if( cmd == "join" ) player,Vehicle = vehs[ globalCount++ ];
}

so the code which vito provided will be easier for a pickup or the code above ?