Posts: 543
Threads: 28
Joined: Jun 2009
Reputation:
0
Hi, I'm trying to make a command for Administrators .. to jump into a free seat in a players cars (if there is a free seat and if the player is in a car) .. thing is, I'm thinking .. how would I go about checking that the passenger seat is free .. if I just cram the player in there without checking, and somebody is already in that seat, it will cause problems, right?
SO .. my question is - How do I check that the seat I want to jump the player into, is free?
Posts: 543
Threads: 28
Joined: Jun 2009
Reputation:
0
How does that help me in the slightest? You want me to check each and every player in the server, to see if they are in a seat in the car the player I'm jumping to is in? I don't understand ..
Posts: 151
Threads: 1
Joined: Apr 2008
Reputation:
0
On the page that dice7 send you, There is a related function calld PutPlayerInVehice, at the bottom of the page. With those functions(GetPlayerVehicleSeat and PutPlayerInVehicle) you should be able to work out a code to do the job. Sorry for not beeing able to help more. Kind of new to scripting.
Posts: 543
Threads: 28
Joined: Jun 2009
Reputation:
0
I've got the code .. all of it, and it works great, but thing is .. I'm worried that when the time comes to warp into a full car (accidentally because there is nothing stopping me from doing so) it's going to crash players, or worse the whole server.
Posts: 2,593
Threads: 38
Joined: Aug 2007
Reputation:
0
Nope, It will only crash if you attempt to exit a vehicle if you're in a non-existing seat, otherwise it's just fine. Best thing to do is freeze your player if you're in a deadseat then OnPlayerKeyStateChange or OnPlayerExitVehicle use SetPlayerPos.