[Include] Player Trailer Attach/Deattach Detection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Player Trailer Attach/Deattach Detection (
/showthread.php?tid=425490)
Player Trailer Attach/Deattach Detection -
SDraw - 25.03.2013
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
Re: Player Trailer Attach/Deattach Detection -
TheArcher - 25.03.2013
Not bad, but what about using "https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle" instead of "OnPlayerUpdate"? u.u
Re: Player Trailer Attach/Deattach Detection -
SDraw - 26.03.2013
Quote:
Originally Posted by TheArcher
Not bad, but what about using "https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle" instead of "OnPlayerUpdate"? u.u
|
Uhm...No, it won't work...
Re: Player Trailer Attach/Deattach Detection -
Maxips2 - 29.03.2013
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.
Re: Player Trailer Attach/Deattach Detection -
SDraw - 29.03.2013
Quote:
Originally Posted by Maxips2
|
I knew that it should start...
This is another thing...