Something like AttachPlayerToVehicle
#1

Hi guys,

I'll try to explain my problem. I'm making fishing system in boat(vehicle model 453). So, if I'm on boat and I freeze player(TogglePlayerControllable), vehicle moves forward(by inertia or affecting waves), but player stays in "air"... Is there a way to fix it? AttachPlayerToVehicle would be awesome, but it doesn't exist :/.

Thanks guys.
Reply
#2

PutPlayerInVehicle?
Maybe with a timer..
Reply
#3

Are you tryina make a command to freeze the player or what?
Reply
#4

Why do you want to freeze the player?
Reply
#5

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
PutPlayerInVehicle?
Maybe with a timer..
I'm trying to make fishing standing on boat's surface.


Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Why do you want to freeze the player?
Because I'm attaching object and applying animation.
Reply
#6

Try like i said..it`s need to work and with a timer.
Or if he is just on boat,not like driver or passanger,try to GetVehiclePos and SetPlayerPos
Reply
#7

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
Try like i said..it`s need to work and with a timer.
Or if he is just on boat,not like driver or passanger,try to GetVehiclePos and SetPlayerPos
Yeah, that's my plan B, but it doesn't look very good to eye...
Reply
#8

Why not?
with a short timer will work.
Or put the boat on x y z.
Reply
#9

1.Create global variable "fishing" which is "1" when player is in fishing and "0" when player is not in fishing
2.Creare global variable "boatid" and put there id of a boat.
3.Use this:

pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:x, Float:y, Float:z;
if(fishing == 1)
{
GetVehiclePos(boatid,x,y,z);
SetPlayerPos(playerid, x,y,z+0.3);
}
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)