08.01.2012, 17:50
See here: https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
You'll need a snippet to find the closest vehicle, but I'm mad tired n im going to sleep
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE) //Or whatever key, look up the full list @ wiki
{
AttachTrailerToVehicle(/*trailerid*/, GetPlayerVehicleID(playerid));
}
}