Trailer position for player
#1

How i can detect if is player behind trailer, behind door..
Reply
#2

Behind door ? O_o

Y'a kidding buddy ? :')

Reply
#3

How do you expect anyone to help you if you don't provide any code that we all can work from? What trailer? What door? What are you talking about? Do you want to detect if a player is NEAR a door, or actually BEHIND it? Expand on your help requests or don't post at all.
Reply
#4

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
Behind door ? O_o

Y'a kidding buddy ? :')

Stop using weird styling and just answer the question.

@OP:

Since the vehicle is not really streamed in, you won't get superaccurate results. However.. the trailers are all the same size, so if you can figure the size out, you can check it's position and angle and see if the player is at POS + (or - depending on the angle.. you can use GetXYInFrontOfPlayer for this I believe) SIZE_OF_VEHICLE. If this is close enough for you to the door, then do your stuff
Reply
#5

GetVehicleModelInfo will allow you to get a vehicle's size.
Reply
#6

I use trailer id 591
I making something and i want to detect if is player behind trailer, btw if is player near door of trailer and do something.

Stop laughing, everything is possible to do !
Reply
#7

I'm not laughing at you, you didn't show any codes,

We aren't in your minde to figure out what are you planing to do.
Reply
#8

Man what code, i here searching code from you, i don't have any example.
Reply
#9

Okay i understood him. and btw KillerDVX stop with your horse shit.

He wants to check if a player is standing behind a trailer at its back (for some rp purposes most probably) m not sure how to check but i got his query
Reply
#10

I think you can use this.

https://sampforum.blast.hk/showthread.php?tid=486060

Look for a function named :

pawn Код:
// Get the position of the vehicle's boot.
stock GetVehicleBoot(vehicleid, &Float:x, &Float:y, &Float:z);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)