SA-MP Forums Archive
how can i place myself in a car on Request Class screen - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how can i place myself in a car on Request Class screen (/showthread.php?tid=138550)



how can i place myself in a car on Request Class screen - johnathon956 - 02.04.2010

and incase you dont know what im on about i want it to work on this public OnPlayerRequestClass(playerid, classid)


Re: how can i place myself in a car on Request Class screen - aircombat - 02.04.2010

use this function : PutPlayerInVehicle


Re: how can i place myself in a car on Request Class screen - johnathon956 - 02.04.2010

Quote:
Originally Posted by !Vampire!
use this function : PutPlayerInVehicle
ok thanks man

ille ****** how to use this opcode


Re: how can i place myself in a car on Request Class screen - [MWR]Blood - 02.04.2010

https://sampwiki.blast.hk/wiki/Function:PutPlayerInVehicle



Re: how can i place myself in a car on Request Class screen - johnathon956 - 02.04.2010

Quote:
Originally Posted by ikarus[PSYCHO
i put this to my script

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, -2098.1057,-1883.2964,110.5234);
SetPlayerCameraPos(playerid, -2098.1057,-1879.2964,110.5234);
SetPlayerCameraLookAt(playerid, -2098.1057,-1883.2964,110.5234);
SetPlayerFacingAngle(playerid, 0);
AddStaticVehicle(400,0.0,0.0,0.0,265.4605,61,26); // just to spawn the car lol
PutPlayerInVehicle(playerid, 400, 0);
return 1;
}

and it didnt work


Re: how can i place myself in a car on Request Class screen - Last_Stand_Guardian - 03.04.2010

pawn Код:
AddStaticVehicle(400,0.0,0.0,0.0,265.4605,61,26); // just to spawn the car lol
PutPlayerInVehicle(playerid, 400, 0);
modelid isn't carid :O!

Try this:
pawn Код:
new RequestCar = AddStaticVehicle(400,0.0,0.0,0.0,265.4605,61,26); // just to spawn the car lol
PutPlayerInVehicle(playerid, RequestCar, 0);



Re: how can i place myself in a car on Request Class screen - johnathon956 - 03.04.2010

Quote:
Originally Posted by Last_Stand_Guardian
pawn Код:
AddStaticVehicle(400,0.0,0.0,0.0,265.4605,61,26); // just to spawn the car lol
PutPlayerInVehicle(playerid, 400, 0);
modelid isn't carid :O!

Try this:
pawn Код:
new RequestCar = AddStaticVehicle(400,0.0,0.0,0.0,265.4605,61,26); // just to spawn the car lol
PutPlayerInVehicle(playerid, RequestCar, 0);
were do i put the new bit LOL


Re: how can i place myself in a car on Request Class screen - adsy - 03.04.2010

exactly the same place as the addstaticvehicle was


Re: how can i place myself in a car on Request Class screen - Dark_Kostas - 03.04.2010

Use CreateVehicle instead of AddStaticVehicle. Because AddStaticVehicle works ONLY on "OnGameModeInit"

pawn Код:
new RequestCar = CreateVehicle(400,0.0,0.0,0.0,265.4605,61,26,60);
PutPlayerInVehicle(playerid, RequestCar, 0);



Re: how can i place myself in a car on Request Class screen - Kyle - 03.04.2010

So like this then,
Код:
public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerPos(playerid, -2098.1057,-1883.2964,110.5234);
  SetPlayerCameraPos(playerid, -2098.1057,-1879.2964,110.5234);
  SetPlayerCameraLookAt(playerid, -2098.1057,-1883.2964,110.5234);
  SetPlayerFacingAngle(playerid, 0);
  new RequestCar = CreateVehicle(400,0.0,0.0,0.0,265.4605,61,26,60);  
  PutPlayerInVehicle(playerid, RequestCar, 0);
  return 1;
}