[Include] Player Trailer Attach/Deattach Detection
#1

Simple include that detects attaching/deattaching of trailer to/from vehicle by player.

Called when: (title says) and player is driver of vehicle (server-side attaching/deattaching also detectable, but when there is a driver in vehicle and he doesn't pause a game).

Callbacks: OnPlayerAttachTrailer(playerid,vehicleid,trailerid ) & OnPlayerDeattachTrailer(playerid,vehicleid,trailer id).

URL: gist.github.com
Reply
#2

Not bad, but what about using "https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle" instead of "OnPlayerUpdate"? u.u
Reply
#3

Quote:
Originally Posted by TheArcher
View Post
Not bad, but what about using "https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle" instead of "OnPlayerUpdate"? u.u
Uhm...No, it won't work...
Reply
#4

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

pawn Code:
native MPGetTrailerTowingVehicle(vehicleid); // finds the vehicle that this trailer is attached to, returns invalid_vehicle_id if invalid or not attached to any towing vehicle.
Reply
#5

Quote:
Originally Posted by Maxips2
View Post
https://sampforum.blast.hk/showthread.php?tid=270508

pawn Code:
native MPGetTrailerTowingVehicle(vehicleid); // finds the vehicle that this trailer is attached to, returns invalid_vehicle_id if invalid or not attached to any towing vehicle.
I knew that it should start...
This is another thing...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)