This topic was marked solved by its starter, on August 8th, 01:36 PM
help with PutPlayerToVeh

MEGAMIND

  • Hero Member
  • Developer of "Web-Net" search engine
  • Posts: 532
help with PutPlayerToVeh
«  »
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

  • Jr. Member
  • Posts: 60
Re: help with PutPlayerToVeh
« Reply #1,  »
player.Vehicle = ::CreateVehicle(217, 0, player.Pos.x, player.Pos.y, player.Pos.z+1, player.Angle, 1, 1);

MEGAMIND

  • Hero Member
  • Developer of "Web-Net" search engine
  • Posts: 532
Re: help with PutPlayerToVeh
« Reply #2,  »
Quote from vitogta on August 8th, 11:50 AM
player.Vehicle = ::CreateVehicle(217, 0, player.Pos.x, player.Pos.y, player.Pos.z+1, player.Angle, 1, 1);
appreciative + i had also found this
Code: [Select]
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 ?