pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) == 1 && attached[playerid] == 0)
{
OnTrailerAttach(playerid, GetPlayerVehicleID(playerid), GetVehicleTrailer(GetPlayerVehicleID(playerid)));
attached[playerid] = 1;
}
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) == 0 && attached[playerid] == 1)
{
attached[playerid] = 1; //// change to 0
}
return 1;
}