how can i place myself in a car on Request Class screen
#1

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

use this function : PutPlayerInVehicle
Reply
#3

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

ille ****** how to use this opcode
Reply
#4

https://sampwiki.blast.hk/wiki/Function:PutPlayerInVehicle
Reply
#5

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
Reply
#6

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);
Reply
#7

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
Reply
#8

exactly the same place as the addstaticvehicle was
Reply
#9

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);
Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)